Showing posts with label should_receive. Show all posts
Showing posts with label should_receive. Show all posts

Tuesday, February 12, 2013

RSpec test failing when testing for parameters using "should_receive" and "with"

So, another weird and frustrating thing happened to me while i was running my app's tests using rspec.
I got 1 failing spec showing the following error:


Spec::Mocks::MockExpectationError in 'FeedsController#get_recent_feeds gets the recent feeds for live deals'

#[Feed:0x3fa7ffc8de1c @name="Feed_1001"] received :all with unexpected arguments
  expected: ({:include=>:feedable,  :order=>"updated_at desc, feedable_type desc"})
       got: ({:include=>:feedable, :order=>"updated_at desc, feedable_type desc"})