[rspec-users] rspec mocha and controller specs without integrated_views

Matt Deiters mdeiters at msn.com
Wed May 23 18:00:33 EDT 2007

The ability to choose a mocking framework is great as I prefer mocha, but I 
am have problems.

On my controller specs, I am forced to 'integrate_views' as the following 
code below shows you, the mocking of views is rspec specific. See stub! 
versus mocha's stub

          unless block_given?
            unless integrate_views?
{ |*args|
                @first_render ||= args[2]
              @template.stub!(:read_template_file).and_return("this is fake 
content generated by rspec")

I am getting the following error: undefined method `stub!'
Any plans on fixing this?


More information about the rspec-users mailing list