Namespace
- MODULE ConcernTest::Bar
- MODULE ConcernTest::Baz
- MODULE ConcernTest::Foo
- MODULE ConcernTest::Qux
Methods
- S
- T
Included Modules
Instance Public methods
setup()
Link
test()
Link
test_class_methods_are_extended()
Link
test_class_methods_are_extended_only_on_expected_objects()
Link
# File activesupport/test/concern_test.rb, line 78 def test_class_methods_are_extended_only_on_expected_objects ::Object.__send__(:include, Qux) Object.extend(Qux::ClassMethods) # module needs to be created after Qux is included in Object or bug won't # be triggered test_module = Module.new do extend ActiveSupport::Concern class_methods do def test end end end @klass.include test_module assert_equal false, Object.respond_to?(:test) Qux.class_eval do remove_const :ClassMethods end end
test_dependencies_with_multiple_modules()
Link
test_included_block_is_ran()
Link
test_module_is_included_normally()
Link
test_modules_dependencies_are_met()
Link
# File activesupport/test/concern_test.rb, line 103 def test_modules_dependencies_are_met @klass.include(Bar) assert_equal "bar", @klass.new.bar assert_equal "bar+baz", @klass.new.baz assert_equal "bar's baz + baz", @klass.baz assert @klass.included_modules.include?(ConcernTest::Bar) end
test_raise_on_multiple_included_calls()
Link