[rspec-users] Why does this stub doesn't work?

2010-10-24 Thread Haim Ashkenazi
ub correctly (FAILED - 1) Failures: 1) test string should interpret stub correctly Failure/Error: sh.say_hello.should eql('NO') expected "NO" got "hello" (compared using eql?) # ./test_spec.rb:18 Finished in 0.0016 second

Re: [rspec-users] Why does this stub doesn't work?

2010-10-24 Thread Haim Ashkenazi
Hi Zach, On Oct 24, 2010, at 11:04 PM, Zach Dennis wrote: > > > On Sun, Oct 24, 2010 at 11:21 AM, Haim Ashkenazi > wrote: > Hi > > I wonder why this stub doesn't work: > > # ruby 1.8.7, rspec 2.0.1 > require 'rubygems' > require 'rspec&#

[rspec-users] Need help to figure out why this expectation isn't met.

2010-10-25 Thread Haim Ashkenazi
Hi This is my first ruby script, so sorry if it's trivial :) I have a should_receive expectation on :new which should work (and works on a simple test I wrote) but it doesn't work in my case and I can't figure out why. The source is on github (commit: 5197b763f391d6d358ca7bc5838375c9247271d8).

Re: [rspec-users] Why does this stub doesn't work?

2010-10-25 Thread Haim Ashkenazi
Hi David, On Oct 25, 2010, at 11:23 AM, David Chelimsky wrote: > On Oct 25, 2010, at 3:20 AM, Haim Ashkenazi wrote: > >> Hi Zach, >> >> On Oct 24, 2010, at 11:04 PM, Zach Dennis wrote: >> >>> >>> >>> On Sun, Oct 24, 2010 at 11:21 AM,

Re: [rspec-users] Need help to figure out why this expectation isn't met.

2010-10-25 Thread Haim Ashkenazi
e 127). Thanks Haim On Oct 25, 2010, at 9:09 AM, Haim Ashkenazi wrote: > Hi > > This is my first ruby script, so sorry if it's trivial :) > > I have a should_receive expectation on :new which should work (and works on a > simple test I wrote) but it doesn't work

Re: [rspec-users] Need help to figure out why this expectation isn't met.

2010-10-26 Thread Haim Ashkenazi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chris, On Oct 26, 2010, at 11:15 AM, Chris Mear wrote: > > On 25 Oct 2010, at 09:54, Haim Ashkenazi wrote: > >> On Oct 25, 2010, at 9:09 AM, Haim Ashkenazi wrote: >> >>> Hi >>> >>> This i