[rspec-users] RSPEC and RoR undefined method for hash when running model tests

David Salgado david at digitalronin.com
Mon Dec 14 16:04:09 EST 2009

Looks like you forgot to put "do" at the end of your specs. I do that
all the time;

it "should have a status of New Record"

Should be

it "should have a status of New Record" do



2009/12/14 Tom Stuart <tom at experthuman.com>:
> On 14 Dec 2009, at 20:36, Matt Riches wrote:
>> 1) Why are my methods undefined, when they are there (I can create the object via script/console and call the status and reset methods and see them work)
>> 2) What is the best way of resolving the issue
> You'd be much better off using pastie.org to show us the real code that's having the problem, because your example contains all sorts of omissions and typos (which is likely to be the sort of thing that causes your problem!) and it's impossible to tell how much of it is wrong in the original code versus how much was introduced by you rewriting it as an example.
> Cheers,
> -Tom
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list