Sha256: 308edbae68486f8f3ce30b22695feb6be4f207194615fb773934cdace9fe7a6f
Contents?: true
Size: 848 Bytes
Versions: 31
Compression:
Stored size: 848 Bytes
Contents
require 'spec_helper' describe Postmark::Json do let(:data) { {"bar" => "foo", "foo" => "bar"} } shared_examples "json parser" do it 'encodes and decodes data correctly' do hash = Postmark::Json.decode(Postmark::Json.encode(data)) hash.should have_key("bar") hash.should have_key("foo") end end context "given response parser is JSON" do before do Postmark.response_parser_class = :Json end it_behaves_like "json parser" end context "given response parser is ActiveSupport::JSON" do before do Postmark.response_parser_class = :ActiveSupport end it_behaves_like "json parser" end context "given response parser is Yajl", :skip_for_platform => 'java' do before do Postmark.response_parser_class = :Yajl end it_behaves_like "json parser" end end
Version data entries
31 entries across 31 versions & 1 rubygems