spec/hexx/dependencies_spec.rb in hexx-5.1.0 vs spec/hexx/dependencies_spec.rb in hexx-5.2.0
- old
+ new
@@ -25,15 +25,20 @@
it "is defined" do
expect(described_module).to respond_to :depends_on
end
- it "allows symbolic attributes" do
+ it "accepts symbolic attributes" do
expect { described_module.depends_on :item }.not_to raise_error
end
- it "allows string attributes" do
+ it "accepts string attributes" do
expect { described_module.depends_on "item" }.not_to raise_error
+ end
+
+ it "accepts arrays" do
+ expect { described_module.depends_on "item", [:item] }
+ .not_to raise_error
end
it "fails when wrong object given" do
expect { described_module.depends_on 1 }.to raise_error TypeError
end