Class: ActionsClassMethodTest

Inherits:
ActiveSupport::TestCase
  • Object
show all
Defined in:
lib/vendor/plugins/inherited_resources/test/class_methods_test.rb

Instance Method Summary collapse

Instance Method Details

#test_actions_are_undefinedObject



32
33
34
35
36
37
38
39
# File 'lib/vendor/plugins/inherited_resources/test/class_methods_test.rb', line 32

def test_actions_are_undefined
  action_methods = BooksController.send(:action_methods)
  assert_equal 2, action_methods.size

  ['index', 'show'].each do |action|
    assert action_methods.include? action
  end
end

#test_actions_are_undefined_when_except_option_is_givenObject



41
42
43
44
45
46
47
48
# File 'lib/vendor/plugins/inherited_resources/test/class_methods_test.rb', line 41

def test_actions_are_undefined_when_except_option_is_given
  action_methods = ReadersController.send(:action_methods)
  assert_equal 5, action_methods.size

  ['index', 'new', 'show', 'create', 'destroy'].each do |action|
    assert action_methods.include? action
  end
end