Sha256: c7d87e63fb2a824b3ed0fc957e947fbc5c008771615a637963f8cf3f1607528f

Contents?: true

Size: 483 Bytes

Versions: 5

Compression:

Stored size: 483 Bytes

Contents

Given /^I have an item with max_price, min_price and average_price$/ do
  class Item
    include Dozuki::Mapper
    attr_accessor :max_price, :min_price, :average_price
  end
end

When /^I map the item node to an item object with:$/ do |string|
  Item.instance_eval %Q{
    map_with do |map|
     #{string}
    end
  }
  @item = Item.from_node(@doc.get('/item'))
end

Then /^the event should have a (.*) of (\d+\.\d+)$/ do |field, float|
  @item.send(field).should == float.to_f
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dozuki-mapper-0.1.2 features/step_definitions/float_steps.rb
dozuki-mapper-0.1.1 features/step_definitions/float_steps.rb
dozuki-mapper-0.1.0 features/step_definitions/float_steps.rb
dozuki-mapper-0.0.2 features/step_definitions/float_steps.rb
dozuki-mapper-0.0.1 features/step_definitions/float_steps.rb