Sha256: ff8923e78a1f92123b40e03fb6446a118b7875f1fba6bfbbe4c68cdb56d28d2a
Contents?: true
Size: 1001 Bytes
Versions: 9
Compression:
Stored size: 1001 Bytes
Contents
require 'spec_helper' describe SafetyPin::NodeBlueprint do let(:node_blueprint) { SafetyPin::NodeBlueprint.new(:path => "/content/foo/bar", :primary_type => "nt:folder", :properties => {"foo" => "bar"}) } describe "#primary_type" do it "has a primary type" do node_blueprint.primary_type.should == "nt:folder" end it "has a default primary type" do SafetyPin::NodeBlueprint.new(:path => "/something").primary_type.should == "nt:unstructured" end end describe "#properties" do it "has properties" do node_blueprint.properties.should == {"foo" => "bar"} end it "defaults to an empty hash" do SafetyPin::NodeBlueprint.new(:path => "/something").properties.should == {} end end describe "#path" do it "requires a path" do expect { SafetyPin::NodeBlueprint.new({}).path }.to raise_error(SafetyPin::NodeBlueprintError) end it "has a path" do node_blueprint.path.should == "/content/foo/bar" end end end
Version data entries
9 entries across 9 versions & 2 rubygems