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
On 8/16/07, Joe Van Dyk <joevandyk at gmail.com> wrote:> 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?Put simply: no. That''s what integration testing is for.> > Joe > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Aug 17, 2007, at 2:59 AM, David Chelimsky wrote:> On 8/16/07, Joe Van Dyk <joevandyk at gmail.com> wrote: >> 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? > > Put simply: no. That''s what integration testing is for.Speaking of which, how is the rbehave integration going? Or are you done with it? Scott
On 8/17/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:> > On Aug 17, 2007, at 2:59 AM, David Chelimsky wrote: > > > On 8/16/07, Joe Van Dyk <joevandyk at gmail.com> wrote: > >> 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? > > > > Put simply: no. That''s what integration testing is for. > > Speaking of which, how is the rbehave integration going? Or are you > done with it?The import-rbehave branch is now fully functional (passing rake pre_commit). Just waiting to coordinate w/ Dan to merge it into trunk. Coming soon.> > Scott > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >