Sha256: 1fc11efd3dd10cbdd93ba9f41ecf0b5425bf9f2ec7dc83704ba91b2a5acdc8e4
Contents?: true
Size: 807 Bytes
Versions: 5
Compression:
Stored size: 807 Bytes
Contents
Feature: mapping a document with float elements to an object So that I don't have to spend all my time typing in repetitive XPaths As an API consumer I want to map a document to an object Scenario: I have a simple mapping Given I have an item with max_price, min_price and average_price And I have the XML: """ <item> <max_price>20.43</max_price> <min_price>9.50</min_price> <average_price>99</average_price> </item> """ When I map the item node to an item object with: """ map.float :max_price map.float :min_price map.float :average_price """ Then the event should have a max_price of 20.43 And the event should have a min_price of 9.50 And the event should have a average_price of 99.0
Version data entries
5 entries across 5 versions & 1 rubygems