Re: [rspec-users] and_return question

2010-05-06 Thread David Chelimsky
On May 6, 2010, at 10:09 AM, Phillip Koebbe wrote: > Are these two forms theoretically functionally equivalent: > > 1) > > car = stub_model(Car) > Car.stub(:new).and_return(car) > > 2) > > Car.stub(:new).and_return(stub_model(Car)) > > I ask because I thought they were, but just hit somethin

Re: [rspec-users] RSpec tasks, JRuby and rvm

2010-05-06 Thread David Chelimsky
On May 6, 2010, at 6:42 PM, Rodrigo Rosenfeld Rosas wrote: > I've been playing with rvm these days and I had a bad surprise today. > > $ rvm install jruby > $ rvm jruby > $ rake test > > failed... > > Of course you didn't understand. I didn't explain yet... > > I've written a Rakefile followi

[rspec-users] RSpec tasks, JRuby and rvm

2010-05-06 Thread Rodrigo Rosenfeld Rosas
I've been playing with rvm these days and I had a bad surprise today. $ rvm install jruby $ rvm jruby $ rake test failed... Of course you didn't understand. I didn't explain yet... I've written a Rakefile following RSpec homepage instructions and adding some options to ruby (namely "--ng", fo

[rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread ben rooney
Thanks guys The law of posting questions came into force. About three minutes after posting my q, I found my mistake (which was exactly as you said). I figured I must have done something wrong, so went back and started again, but it was the reporting that was baffling me - and that is already being

[rspec-users] and_return question

2010-05-06 Thread Phillip Koebbe
Are these two forms theoretically functionally equivalent: 1) car = stub_model(Car) Car.stub(:new).and_return(car) 2) Car.stub(:new).and_return(stub_model(Car)) I ask because I thought they were, but just hit something that suggests they are not. I was originally using the first form, but t

Re: [rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread David Chelimsky
On May 6, 2010, at 8:47 AM, Rick DeNatale wrote: > On Thu, May 6, 2010 at 5:02 AM, ben rooney > wrote: >> Slightly flummoxed on this one. >> >> Spec::Mocks::MockExpectationError in 'ChartEventsController handling >> GET /chart_events should find all chart_events given a value' >> expected: ([

Re: [rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread Rick DeNatale
On Thu, May 6, 2010 at 5:02 AM, ben rooney wrote: > Slightly flummoxed on this one. > > Spec::Mocks::MockExpectationError in 'ChartEventsController handling > GET /chart_events should find all chart_events given a value' >  expected: ([:all, {:conditions=>["value LIKE ?", "%chart_event%"]}]) >    

[rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread ben rooney
Slightly flummoxed on this one. Spec::Mocks::MockExpectationError in 'ChartEventsController handling GET /chart_events should find all chart_events given a value' expected: ([:all, {:conditions=>["value LIKE ?", "%chart_event%"]}]) got: ([:all, {:conditions=>["value LIKE ?", "%chart_event