[rspec-users] specing a model to make sure it implements act_as_authentic

Neha J. lists at ruby-forum.com
Thu Dec 16 01:22:54 EST 2010


Hello Stephen,

I came across same problem few days back.
Its very simple. You need not spec a model to check if the model
acts_as_authentic.
I am using RSpec with Factory_girl. So when I create factory for my
respective model, Factory does the checking for the model. Try creating
a Factory for respective model in before (:each) block.
And for cross-checking, just comment out the acts_as_authentic line from
your model file.
You should be able to see the error message onscreen when spec runs.
And when you uncomment the line, spec runs with 0 errors.

Hope this helps.

--Neha Jain

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list