Add unit tests for Registry#keys.
This commit is contained in:
parent
4194da19c6
commit
8909018af6
|
@ -41,6 +41,13 @@ describe Vagrant::Registry do
|
|||
instance["foo"].should eql(object)
|
||||
end
|
||||
|
||||
it "should be able to get keys with #keys" do
|
||||
instance.register("foo") { "bar" }
|
||||
instance.register("baz") { "qux" }
|
||||
|
||||
instance.keys.sort.should == [ 'baz', 'foo' ]
|
||||
end
|
||||
|
||||
it "should cache the result of the item so they can be modified" do
|
||||
# Make the proc generate a NEW array each time
|
||||
instance.register("foo") { [] }
|
||||
|
|
Loading…
Reference in New Issue