[rspec-users] Scope and specing models
David Parker
nemo7467 at gmail.com
Sun Aug 12 16:53:24 EDT 2007
Hello all, I'm currently having an issue with some specs, specifically scope
issues (probably more of a scope issue than a spec issue at this point)...
Here's the error:
ActiveRecord::AssociationTypeMismatch in 'A new User should know what role
it has'
Role expected, got NilClass
D:/ruby/projects/restful_authentication_test/config/../app/models/role.rb:5:in
`add'
./spec/models/user_spec.rb:62:
script/spec:4:
Here's the user.rb
http://pastie.caboo.se/87029
role.rb
http://pastie.caboo.se/87030
user_spec.rb
http://pastie.caboo.se/87032
The code is based off of RESTful authentication +
Ben Curtis' user roles in Rails Application:
http://www.bencurtis.com/archives/2007/06/user-roles-in-rails-applications/
Thanks for your help!
--
dp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070812/38430919/attachment.html
More information about the rspec-users
mailing list