Sha256: 29e1b0af53335fe56972e3a41d6ab74c65261379a5d01738e94d85386465d88c

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

class FillIN::ComplexInput

  include Pickles

  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

9 entries across 9 versions & 1 rubygems

Version Path
pickles-0.1.8 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.7 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.6 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.5 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.4 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.3 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.2 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.1 lib/cucumber/pickles/steps/fill_in/complex_input.rb
pickles-0.1.0 lib/cucumber/pickles/steps/fill_in/complex_input.rb