spec/controllers/rakismet_controller_spec.rb in rakismet-0.4.0 vs spec/controllers/rakismet_controller_spec.rb in rakismet-0.4.1

- old
+ new

@@ -9,46 +9,35 @@ def one ; render :nothing => true; end def two ; render :nothing => true; end end describe StubController do - - it "should set Rakismet::Base.rakismet_binding" do - Rakismet::Base.should_receive(:rakismet_binding=).twice - get :one - end - - it "should return Rakismet::Base.rakismet_binding to nil after request" do - get :one - Rakismet::Base.rakismet_binding.should be_nil - end - it "should add around_filter" do - StubController.filter_chain.map(&:class).should include(ActionController::Filters::AroundFilter) + StubController.filter_chain.map(&:method).should include(Rakismet::Filter) end end describe StubController.subclass('OnlyActions') { rakismet_filter(:only => :one) } do it "should add around filter to specified actions" do - Rakismet::Base.should_receive(:rakismet_binding=).twice + Rakismet::Base.should_receive(:current_request=).twice get :one end it "should not add around filter to unspecified actions" do - Rakismet::Base.should_not_receive(:rakismet_binding=) + Rakismet::Base.should_not_receive(:current_request=) get :two end end describe StubController.subclass('ExceptActions') { rakismet_filter(:except => :one) } do it "should not add around filter to specified actions" do - Rakismet::Base.should_not_receive(:rakismet_binding=) + Rakismet::Base.should_not_receive(:current_request=) get :one end it "should add around filter to other actions" do - Rakismet::Base.should_receive(:rakismet_binding=).twice + Rakismet::Base.should_receive(:current_request=).twice get :two end end