spec/support/utils.rb in saorin-0.3.2 vs spec/support/utils.rb in saorin-0.4.0
- old
+ new
@@ -1,13 +1,13 @@
require 'saorin/test'
-def deserialize(data)
+def json_decode(data)
data && JSON.load(data)
end
def validates(process, inputs, answers)
inputs.zip(answers).each do |input, answer|
- output = deserialize process.call(input)
- answer = deserialize answer
+ output = process.call(input)
+ answer = json_decode answer
output.should eq answer
end
end