summaryrefslogtreecommitdiff
path: root/spec/unit/dsl
diff options
context:
space:
mode:
authorClaire McQuin <clairemcquin@d-69-91-153-195.dhcp4.washington.edu>2014-01-15 14:11:07 -0800
committerClaire McQuin <clairemcquin@d-69-91-153-195.dhcp4.washington.edu>2014-01-15 14:11:07 -0800
commit3e7b1381479476cfa4884e72298ab602d430f34f (patch)
tree4058ce6ff72af54419f44b8f9cbe1cef905ce954 /spec/unit/dsl
parentd1041a994b402f828ae1a3ce6633cc0540e25a75 (diff)
downloadohai-3e7b1381479476cfa4884e72298ab602d430f34f.tar.gz
revert provides_map changes, ensure provides and depends only collect unique attributes
Diffstat (limited to 'spec/unit/dsl')
-rw-r--r--spec/unit/dsl/plugin_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/dsl/plugin_spec.rb b/spec/unit/dsl/plugin_spec.rb
index e0a2f233..61283ac0 100644
--- a/spec/unit/dsl/plugin_spec.rb
+++ b/spec/unit/dsl/plugin_spec.rb
@@ -143,6 +143,12 @@ describe Ohai::DSL::Plugin::VersionVII do
plugin = Ohai.plugin(@name) { provides("two", "three") }
plugin.provides_attrs.should eql(["one", "two", "three"])
end
+
+ it "should collect unique attributes" do
+ plugin = Ohai.plugin(@name) { provides("one") }
+ plugin = Ohai.plugin(@name) { provides("one", "two") }
+ plugin.provides_attrs.should eql(["one", "two"])
+ end
end
describe "#depends" do
@@ -170,6 +176,12 @@ describe Ohai::DSL::Plugin::VersionVII do
plugin = Ohai.plugin(@name) { depends("two", "three") }
plugin.depends_attrs.should eql(["one", "two", "three"])
end
+
+ it "should collect unique attributes" do
+ plugin = Ohai.plugin(@name) { depends("one") }
+ plugin = Ohai.plugin(@name) { depends("one", "two") }
+ plugin.depends_attrs.should eql(["one", "two"])
+ end
end
describe "#collect_data" do