Sha256: b55e43ea281c2fade2d1e5dfeb6213d3a936b3870ab17c850c3ab7e033fdbae4
Contents?: true
Size: 504 Bytes
Versions: 12
Compression:
Stored size: 504 Bytes
Contents
require 'test_helper' class LoadHooksControllerTest < ActionController::TestCase setup do ActiveSupport.on_load(:devise_controller) do define_method :defined_by_load_hook do puts 'I am defined dynamically by activesupport load hook' end end end teardown do DeviseController.class_eval { undef :defined_by_load_hook } end test 'load hook called when controller is loaded' do assert DeviseController.instance_methods.include? :defined_by_load_hook end end
Version data entries
12 entries across 12 versions & 3 rubygems