test/collection_json_test.rb in roar-0.12.4 vs test/collection_json_test.rb in roar-0.12.5

- old
+ new

@@ -32,13 +32,15 @@ end end describe "#to_json" do it "renders document" do + collection_key = Representable::VERSION =~ /^1.8/ ? "collection" : :collection + [song].extend(rpr).to_hash.must_equal( { - :collection=>{ + collection_key=>{ "version"=>"1.0", "href"=>"//songs/", "template"=>{ :data=>[ @@ -46,10 +48,10 @@ {:name=>"length", :value=>nil} ] }, "queries"=>[ - {:rel=>:search, :href=>"//search", + {:rel=>:search, :href=>"//search", :data=>[ {:name=>"q", :value=>""} ] } ], \ No newline at end of file