spec/spec_helper.rb in contentful_middleman-4.0.1 vs spec/spec_helper.rb in contentful_middleman-4.1.0
- old
+ new
@@ -29,9 +29,15 @@
yaml = YAML.parse(File.read("spec/fixtures/yaml_fixtures/#{name}.yaml")).to_ruby
yield yaml if block_given?
yaml
end
+def json(name)
+ json = JSON.load(File.read("spec/fixtures/json_fixtures/#{name}.json"))
+ yield json if block_given?
+ json
+end
+
class ServerDouble
def [](key)
end
end