Sha256: 345d92ec7fbf8aad2ed7eb36166685a9e4e19662ef8b9e34ca733724cd81bd63
Contents?: true
Size: 753 Bytes
Versions: 12
Compression:
Stored size: 753 Bytes
Contents
require_relative "spec_helper" require_relative "../lib/conglomerate" describe Conglomerate::Query do let(:query) { Conglomerate::Query.new( :href => "http://this.is.a.query/", :rel => "some_query" ) } context "required attributes" do specify "href" do expect { Conglomerate::Query.new(:rel => "") }.to raise_error("MissingAttribute") end specify "rel" do expect { Conglomerate::Query.new(:href => "") }.to raise_error("MissingAttribute") end end context "data" do it "serializes properly" do datum = Conglomerate::Datum.new(:name => "name") query.data << datum expect(Conglomerate.serialize(query)["data"]).to include(Conglomerate.serialize(datum)) end end end
Version data entries
12 entries across 12 versions & 1 rubygems