[rspec-users] Mocking a non-existent method

Joe Van Dyk joevandyk at gmail.com
Thu Aug 16 02:08:35 EDT 2007


I don't like this:

    i = mock(Integer)
    i.should_receive(:asdfasdf).and_return('foo')
    puts i.asdfasdf


Shouldn't rspec check to see that :asdfasdf is a valid message to be
sending Integer?

Joe


More information about the rspec-users mailing list