features/step_definitions/json_steps.rb in berkshelf-1.1.6 vs features/step_definitions/json_steps.rb in berkshelf-1.2.0.rc1
- old
+ new
@@ -1,3 +1,10 @@
Then /^the output should be JSON$/ do
lambda { parse_json(all_output) }.should_not raise_error
end
+
+Then /^the file "(.*?)" should contain JSON:$/ do |file, data|
+ target = MultiJson.decode(data)
+ actual = MultiJson.decode(File.read(File.join(current_dir, file)))
+
+ target.should eql(actual)
+end