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