Sha256: 29ed9538543c9f9bbccddd2944d8153a71198f6143572b21877d820823beeccf

Contents?: true

Size: 553 Bytes

Versions: 9

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

module Archangel
  module TestingSupport
    ##
    # SimpleForm input meta type for testing
    #
    module InputExampleGroup
      extend ActiveSupport::Concern

      include RSpec::Rails::HelperExampleGroup

      def input_for(object, attribute_name, options = {})
        helper.simple_form_for object, url: "" do |form|
          form.input attribute_name, options
        end
      end
    end
  end
end

RSpec.configure do |config|
  config.include Archangel::TestingSupport::InputExampleGroup, type: :input
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
archangel-0.4.0 lib/archangel/testing_support/support/inputs.rb
archangel-0.3.0 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.8 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.7 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.6 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.5 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.4 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.3 lib/archangel/testing_support/support/inputs.rb
archangel-0.0.2 lib/archangel/testing_support/support/inputs.rb