I’m try to stub the following in my view code but keep running into
problems with unexpected messages. I’ve tried stubbing and mocking in
many combinations but can’t find away past this. Here is the code
below I am trying to spec
- if page.parent_id.nil?
I receive this error Mock “MongoidCriteria_1004” received unexpected
message :title with (no args) when I do the following
=> mock_model(“Page”, :title => “foobar”)))
I’ve tried every combination I can think of but can’t figure out how
to stub this.