test/singleton_test.rb in josevalim-inherited_resources-0.5.2 vs test/singleton_test.rb in josevalim-inherited_resources-0.6.0
- old
+ new
@@ -12,15 +12,15 @@
class ManagersController < InheritedResources::Base
belongs_to :store, :singleton => true
end
-class SingletonTest < TEST_CLASS
+class SingletonTest < ActionController::TestCase
+ tests ManagersController
def setup
- @controller = ManagersController.new
- @controller.request = @request = ActionController::TestRequest.new
- @controller.response = @response = ActionController::TestResponse.new
+ @controller.stubs(:resource_url).returns('/')
+ @controller.stubs(:collection_url).returns('/')
end
def test_expose_the_resquested_manager_on_show
Store.expects(:find).with('37').returns(mock_store)
mock_store.expects(:manager).returns(mock_manager)