On Thu, May 2, 2013 at 6:29 PM, Vighnesh Rege <vighnesh1...@gmail.com>wrote:
> > On Thu, May 2, 2013 at 3:01 PM, Kwasi Mensah <kwasi.men...@gmail.com>wrote: > >> @test_hash["foobar"].size should be 1 >> > > Shouldn't there be a dot between size and should? > Also, shouldn't the expected value be 3? > > Even after making these changes: > ``` > @test_hash["foobar"].should be 3 > ``` > the test fails for a reason that I'm not aware of. Personally, I'm more > comfortable with the expect syntax[ > https://github.com/rspec/rspec-expectations]. I changed the first test to: > > ``` > it do > expect(@test_hash["foobar"].size).to eq 3 > end > ``` > > And it now works. > D'oh. You're right. writing "size.should" should work. And sorry for using the wrong number (was mixing with the original case that inspired this). > > > Vighnesh > > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users