Permalink
Browse files

Test that :scoped is not used when unavailable.

  • Loading branch information...
Adam Wróbel authored and josevalim committed Feb 21, 2011
1 parent c4468f4 commit 739ffb1188824cef3ed8bbf225186a05956262b1
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/base_test.rb
View
@@ -76,6 +76,12 @@ def test_render_all_users_as_xml_when_mime_type_is_xml
assert_response :success
assert_equal 'Generated XML', @response.body
end
def test_scoped_is_called_only_when_available
User.stubs(:all).returns([mock_user])
get :index
assert_equal Array, assigns(:users).class
end
end
class ShowActionBaseTest < ActionController::TestCase

0 comments on commit 739ffb1

Please sign in to comment.