search for: application_spec

Displaying 2 results from an estimated 2 matches for "application_spec".

2008 Apr 29
1
Spec''ing controller macros
...receive the following error: Spec::Mocks::MockExpectationError in ''ApplicationController should turn off session management for requests made by robot user agent'' Mock ''FooController'' expected :session with (:off) but received it with (no args) ./spec/controllers/application_spec.rb:19: Any suggestions? Thanks much, Matt describe ApplicationController do class FooController < ApplicationController def index; render :text => "foo"; end end controller_name :foo it "should turn off session management for requests made by robot user ag...
2007 May 24
25
Specs for ApplicationController, where to put them?
...want all of your controllers to use. In my case I''m using it to provide methods such as "current_user" and "logged_in?" etc. By default, RSpec doesn''t produce a corresponding spec file for this controller. I''ve made a spec file (spec/controllers/application_spec.rb) so that I can test these methods, but I''m not sure if this is the right thing to do. Should I be testing only the non-abstract subclasses instead? Cheers, Wincent