Sha256: 5a35a8365c5feafc9cc432a7a748a0df7d6120ab9fcddd463014b2bee59f5ad4
Contents?: true
Size: 872 Bytes
Versions: 76
Compression:
Stored size: 872 Bytes
Contents
require 'test_helper' class TestHelperTest < MiniTest::Spec describe "#assert_json" do it "tests for equality" do assert_json "{\"songs\":{\"one\":\"65\",\"two\":\"Emo Boy\"}}", "{\"songs\":{\"one\":\"65\",\"two\":\"Emo Boy\"}}" end it "allows different key orders" do assert_json "{\"songs\":{\"one\":\"65\",\"two\":\"Emo Boy\"}}", "{\"songs\":{\"two\":\"Emo Boy\",\"one\":\"65\"}}" end it "complains when expected hash is subset" do assert_raises MiniTest::Assertion do assert_json "{\"songs\":{\"one\":\"65\"}}", "{\"songs\":{\"two\":\"Emo Boy\",\"one\":\"65\"}}" end end it "complains when source hash is subset" do assert_raises MiniTest::Assertion do assert_json "{\"songs\":{\"two\":\"Emo Boy\",\"one\":\"65\"}}", "{\"songs\":{\"one\":\"65\"}}" end end end end
Version data entries
76 entries across 72 versions & 3 rubygems