Skip to content

Instantly share code, notes, and snippets.

@mattwynne
Forked from aslakhellesoy/Suggestion #1.rb
Created January 29, 2009 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mattwynne/54849 to your computer and use it in GitHub Desktop.
Save mattwynne/54849 to your computer and use it in GitHub Desktop.
it 'should do something' do
on_failure warn_that "@foo shouldn't be nil" do
@foo.should_not be_nil
end
end
it 'should do something' do
explain_that "@foo shouldn't be nil" unless
@foo.should_not be_nil
end
end
it 'should do something' do
on_failure do
@foo.should_not be_nil
end.report "this message"
end
it 'should do something' do
lambda do
@foo.should_not be_nil
end.on_error "this message"
end
it 'should do something' do
@foo.should_not be_nil(:because => "we like our foos, we do")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment