Sha256: 1aebedd1fcd2e937a4a4ed8dc10bf1babe5ae942b5f622b693f66987bb952675

Contents?: true

Size: 403 Bytes

Versions: 8

Compression:

Stored size: 403 Bytes

Contents

class FillIN::ComplexInput

  include Pickles

  attr_reader :value, :label

  def initialize(label, value, within)
    @label  = label
    @value  = value
    @within = within || Capybara.current_session
  end

  def call
    @value.split(/\s*:\s*/).each.with_index do |value, index|
      input_locator = "#{label}[#{index}]"

      FillIN::Input.new(input_locator, value, @within)
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pickles-0.2.4 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.2.3 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.2.2 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.2.1 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.2.0 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.12 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.10 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.9 lib/cucumber/pickles/steps/fill_in/complex_input.rb