test/test_helper.rb in active_fulfillment-0.10.0 vs test/test_helper.rb in active_fulfillment-1.0.0
- old
+ new
@@ -46,9 +46,13 @@
yaml_data = YAML.load(File.read(file))
symbolize_keys(yaml_data)
yaml_data
end
+
+ def xml_fixture(path) # where path is like 'usps/beverly_hills_to_ottawa_response'
+ open(File.join(File.dirname(__FILE__),'fixtures','xml',"#{path}.xml")) {|f| f.read}
+ end
def symbolize_keys(hash)
return unless hash.is_a?(Hash)
hash.symbolize_keys!