Skip to content

Instantly share code, notes, and snippets.

@tomstuart
Created July 13, 2014 10:56
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 tomstuart/228e6b929d919d373bbf to your computer and use it in GitHub Desktop.
Save tomstuart/228e6b929d919d373bbf to your computer and use it in GitHub Desktop.
require 'rspec/core'
examples = RSpec.describe 'a "Hello world" object' do
before(:each) do
@hello_world = HelloWorld.new
end
it 'says "Hello world"' do
raise unless @hello_world.message == 'Hello world'
end
end
examples.run(RSpec.configuration.reporter) # fails
class HelloWorld
def message
'Hello world'
end
end
examples.run(RSpec.configuration.reporter) # fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment