Skip to content

Commit

Permalink
fix so json spec use the default json parser
Browse files Browse the repository at this point in the history
  • Loading branch information
unders committed Nov 24, 2012
1 parent 55e9b05 commit b34349b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/resto_spec.rb
Expand Up @@ -3,6 +3,8 @@
describe Resto do

describe ".json_decode[json]" do
before { Resto.json_decode = ->(json) { JSON.parse(json) } }

json = "{\"foo\":12425125,\"bar\":\"some string\"}"

hash = { 'foo' => 12425125, 'bar' => "some string" }
Expand All @@ -13,6 +15,8 @@
end

describe ".json_encode[hash]" do
before { Resto.json_encode = ->(hash) { JSON.dump(hash) } }

hash = { 'foo' => 12425125, 'bar' => "some string" }

json = "{\"foo\":12425125,\"bar\":\"some string\"}"
Expand Down

0 comments on commit b34349b

Please sign in to comment.