Sha256: 799b0bccea5c9004039605e136bc947a4e4d4884d60c2ebaae693fbfefea8d6f

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe 'Formtastic::FormBuilder#action' do
  include_context 'Action Helper' # from spec/support/shared_examples.rb

  # TODO: remove this in Formtastic 4.0
  describe 'instantiating an action class' do
    context 'of unknown action' do
      it "should try to load class named as the action" do
        expect {
          semantic_form_for(@new_post) do |builder|
            builder.action(:destroy)
          end
        }.to raise_error(Formtastic::UnknownActionError, 'Unable to find action destroy')
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
formtastic-3.1.5 spec/helpers/action_helper_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/formtastic-3.1.4/spec/helpers/action_helper_spec.rb
formtastic-3.1.4 spec/helpers/action_helper_spec.rb
formtastic-3.1.3 spec/helpers/action_helper_spec.rb
formtastic-3.1.2 spec/helpers/action_helper_spec.rb
formtastic-3.1.1 spec/helpers/action_helper_spec.rb
formtastic-3.1.0 spec/helpers/action_helper_spec.rb
formtastic-3.1.0.rc2 spec/helpers/action_helper_spec.rb
formtastic-3.1.0.rc1 spec/helpers/action_helper_spec.rb