diff --git a/lib/rucaptcha.rb b/lib/rucaptcha.rb index de55b5b..98d0bfd 100644 --- a/lib/rucaptcha.rb +++ b/lib/rucaptcha.rb @@ -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 diff --git a/spec/view_spec.rb b/spec/view_spec.rb new file mode 100644 index 0000000..296c641 --- /dev/null +++ b/spec/view_spec.rb @@ -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