|
|
@ -133,10 +133,10 @@ class DocsDocTest < MiniTest::Spec
|
|
|
|
assert_instance_of Hash, doc.as_json
|
|
|
|
assert_instance_of Hash, doc.as_json
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it "includes the doc's name, slug, type, and release" do
|
|
|
|
it "includes the doc's name, slug, type, version, and release" do
|
|
|
|
assert_equal %i(name slug type), doc.as_json.keys
|
|
|
|
assert_equal %i(name slug type), doc.as_json.keys
|
|
|
|
|
|
|
|
|
|
|
|
%w(name slug type release links).each do |attribute|
|
|
|
|
%w(name slug type version release links).each do |attribute|
|
|
|
|
eval "stub(doc).#{attribute} { attribute }"
|
|
|
|
eval "stub(doc).#{attribute} { attribute }"
|
|
|
|
assert_equal attribute, doc.as_json[attribute.to_sym]
|
|
|
|
assert_equal attribute, doc.as_json[attribute.to_sym]
|
|
|
|
end
|
|
|
|
end
|
|
|
|