Rails: undefined method `stub!' (NoMethodError)
From FVue
Problem
When running `rake spec', I receive this message:
$ ... active_record/base.rb:1959:in `method_missing_without_paginate': undefined method `stub!' for #<Class:0xb6d68218> (NoMethodError) ...
Solution
`stub!' should be called *inside* an `it' block:
< Checkin.stub!(:find).and_return([mock_checkin]) < it "should create balance records" do --- > it "should create balance records" do > Checkin.stub!(:find).and_return([mock_checkin])
Advertisement