On Thu, Jun 9, 2011 at 14:33, Karl wrote:
> Obviously, I'm missing something very simple, can someone please
> explain how to stub an instance of an AR model method.
>
> This does not work:
> @widget = Widget.first # Widget has an instance method called
> 'next_seriel_number'
> @widget.stub(:next_
Hello,
I'm doing namespace routing based on subdomain, rather than path, so
that http://admin.example.com/pages leads to app/controllers/admin/
pages_controller.rb. Cucumber is following this fine, but RSpec is
complaining that the requested route doesn't exist even though "rake
routes" shows the
Obviously, I'm missing something very simple, can someone please
explain how to stub an instance of an AR model method.
This does not work:
@widget = Widget.first # Widget has an instance method called
'next_seriel_number'
@widget.stub(:next_serial_number).and_return(43, nil)
I know I could use '