Generate pretty JSON in docs.json manifest

To make it easier to track changes in Git.
pull/775/head
Thibaut Courouble 7 years ago
parent 0095779b3f
commit 68b80bce36

@ -21,7 +21,7 @@ module Docs
end
def to_json
JSON.generate(as_json)
JSON.pretty_generate(as_json)
end
end
end

@ -78,7 +78,7 @@ class ManifestTest < MiniTest::Spec
describe "#to_json" do
it "returns the JSON string for #as_json" do
stub(manifest).as_json { { test: 'ok' } }
assert_equal '{"test":"ok"}', manifest.to_json
assert_equal "{\n \"test\": \"ok\"\n}", manifest.to_json
end
end
end

Loading…
Cancel
Save