search for: find_activ

Displaying 1 result from an estimated 1 matches for "find_activ".

Did you mean: find_active
2007 Jul 16
4
RSpec - concerns about mocking
...into RSpec more after getting the awesome Peepcode screencast about it. So far I love it, but coming form Test::Unit with Rails, I have some concerns about the recommendation to mock models and database calls in controller and view specs. Lets say you have a method on your User model called User.find_activated, and you have models specs for it. Then in your controller specs you mock it up like so: @user = mock_model(User) User.stub!(:find_activiated).and_return(@user) Everything works great, and specs execute fast due to limited DB access. What if I then refactor, and decide to rename the fin...