Skip to content

Instantly share code, notes, and snippets.

@jrab89
Created August 8, 2014 20:31
Show Gist options
  • Save jrab89/aa78383d9e1cd0bc623e to your computer and use it in GitHub Desktop.
Save jrab89/aa78383d9e1cd0bc623e to your computer and use it in GitHub Desktop.
How do you get this to not output 'foo' ?
class Foo
attr_reader :number
def initialize
puts 'foo'
@number = 1
end
end
describe Foo do
describe '#new' do
it 'sets number' do
foo = Foo.new
expect(foo.number).to eql 1
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment