Fix typo, and add test for ActionView

This commit is contained in:
Jason Lee 2017-02-15 12:31:25 +08:00
parent eb1b0e8a29
commit d15e876ae8
2 changed files with 11 additions and 1 deletions

View File

@ -39,6 +39,6 @@ ActiveSupport.on_load(:action_controller) do
ActionController::Base.send :include, RuCaptcha::ControllerHelpers
end
ActiveSupport.on_load(:active_view) do
ActiveSupport.on_load(:action_view) do
include RuCaptcha::ViewHelpers
end

10
spec/view_spec.rb Normal file
View File

@ -0,0 +1,10 @@
require 'spec_helper'
describe ActionView::Base do
describe '.rucaptcha_input_tag' do
it 'should work' do
view = ActionView::Base.new
expect(view.respond_to?(:rucaptcha_input_tag)).to eq true
end
end
end