Like I mentioned yesterday, I started trying out rSpec. When in Rails, it's a little different. You need to include more stuff. I couldn't get my spec to run properly. Apparently, you have to import a bunch of stuff:
require File.dirname(__FILE__) + '/../../config/boot'
require "#{RAILS_ROOT}/config/environment"
require File.dirname(__FILE__) + '/../../app/models/project_management'
The first two lines I got from the codehappy blog post. The third just imports the model I'm testing out.
I may be doing it completely wrong so I'd appreciate any feed back.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment