Skip to content

Instantly share code, notes, and snippets.

@masarakki
Created April 4, 2012 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masarakki/2299693 to your computer and use it in GitHub Desktop.
Save masarakki/2299693 to your computer and use it in GitHub Desktop.
# foo_spec.rb
class Foo
def self.bar
raise
end
end
describe Foo do
subject { @foo }
describe :bad_failure_output do
before do
@foo = Foo.bar
end
it { should be_nil }
end
describe :good_failure_output do
before do
@foo = Foo.new
end
it { should be_nil }
end
end
%rspec foo_spec.rb --format doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment