Skip to content

Instantly share code, notes, and snippets.

@wireframe
Created October 7, 2011 14:43
Show Gist options
  • Save wireframe/1270413 to your computer and use it in GitHub Desktop.
Save wireframe/1270413 to your computer and use it in GitHub Desktop.
IT
basic out of the box example definition.
it { should be_true }
SPECIFY
alias for IT. use to make your example more readable
specify { @user.should be_true }
FOCUSED
focus test execution to only execute this example. run by using --tag focused from the commandline
focused { @user.do_stuff.should == true }
$ rspec --tag focused spec/my_spec.rb
FOCUS
alias for focused
focus { @user.do_stuff.should == true }
PENDING
comment out an example
pending { @user.do_stuff.should == true }
XIT
alias for pending. useful for quickly changing "it" to "xit"
xit { @user.do_stuff.should == true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment