Sha256: e47663cbe66c077a3ffefc93d085a16be112ef8986300536b0d2fd1729a67d74

Contents?: true

Size: 332 Bytes

Versions: 5

Compression:

Stored size: 332 Bytes

Contents

module SelectDateSpecHelper

  def select_date(date, options = {})
    field = options[:from]
    base_id = find(:xpath, ".//label[contains(.,'#{field}')]")[:for]
    year, month, day = date.split(",")
    select year,  from: "#{base_id}_1i"
    select month, from: "#{base_id}_2i"
    select day,   from: "#{base_id}_3i"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta11 spec/support/select_date_spec_helper.rb
renalware-core-2.0.0.pre.beta10 spec/support/select_date_spec_helper.rb
renalware-core-2.0.0.pre.beta9 spec/support/select_date_spec_helper.rb
renalware-core-2.0.0.pre.beta8 spec/support/select_date_spec_helper.rb
renalware-core-2.0.0.pre.beta7 spec/support/select_date_spec_helper.rb