RSpec Buddy
A RSpec buddy for Sublime Text.
Details
Installs
- Total 1K
- Win 155
- Mac 715
- Linux 295
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
RSpec Buddy
A small Sublime Text package to boost your productivity when using RSpec.
A modified fork of https://github.com/fnando/better-rspec-for-sublime-text.
Features
Inherited from Better RSpec
- command and shortcut for toggling between implementation/spec files (see demo)
- syntax highlighting
RSpec Buddy exclusive ⭐️
describe
block generation for each of your classes and methods when creating a new spec file (see demo)- configuration file
- some handy little tweaks
Toggling between implementation/spec
The default binding is super+.
.
{
"keys": ["super+."],
"command": "rspec_toggle"
}
You can change it to whatever you want by adding the following snippet to your Keybindings file.
{
"keys": ["ctrl+alt+down"],
"command": "rspec_toggle"
}
Describe block generation
- infers the class/module name from the implementation file path to put at
RSpec.describe
- creates a
describe
block for each method from the implementation file
Configuration file
Reads an optional .rspec-buddy
file so you can customize the path to ignore when looking for spec and implementation files
Suppose you have the following structure:
project/
lib/
whatever/
file.rb
spec/
file_spec.rb
By invoking the rspec_toggle
command, this plugin will look for the spec file at project/spec/whatever/file_spec.rb
(by default lib/
will always be ignored).
But you can create a project/.rspec-buddy
file with the content lib/whatever/
for instance, then, the plugin will look for the spec file at project/spec/file_spec.rb
(ignoring lib/whatever/
).
Handy tweaks
- does not add
require 'spec_helper'
/require 'rails_helper'
to spec files as you can keep your tests clean by putting them in the.rspec
file. - remove all snippets from the Better RSpec as I believe you should create the ones you like.
Syntax Detection
The best way of setting the syntax automatically is using the ApplySyntax package. Just install it and you're done!
Installation
Package Control
- Open the Command Palette (Super+Shift+p) and choose “*Install Package*”
- Select “*RSpec Buddy*” and press Enter
Using Git
- Change to your Sublime Text
Packages
directory - Clone repository
git clone https://github.com/glaucocustodio/rspec-buddy-for-sublime-text.git 'RSpec Buddy'
Similar packages
License
The gem is available as open source under the terms of the MIT License.