Is it possible to create a stub that returns hash values.

For example I would like to convert this:
  @siteItem = stub('plmSiteItem', :one => "uno")

To something like this:
  @siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' => 'dos'} )

So that I can do this:
   @siteItem['one'] should == 'uno'
   @siteItem['two'] should == 'dos'


Actually I first tried to use method double instead of stub - even though I still don't know when each is preferred - but double raised a missing method error for some reason.



_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to