Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Forked from dchelimsky/Suggestion #1.rb
Created January 29, 2009 21:25
Show Gist options
  • Save aslakhellesoy/54758 to your computer and use it in GitHub Desktop.
Save aslakhellesoy/54758 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment