summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-09-01 00:20:15 -0700
committerLuke Kanies <luke@madstop.com>2009-09-01 00:20:15 -0700
commit800a78b993f15e2d77312bf207929ec876e9b227 (patch)
treeb56321378a756cac23efadb3c3a555dd35a8c669 /spec
parent6750aeb90a4d19a2cd1de3ff007f216d31c4e65d (diff)
downloadpuppet-800a78b993f15e2d77312bf207929ec876e9b227.tar.gz
puppet-800a78b993f15e2d77312bf207929ec876e9b227.tar.xz
puppet-800a78b993f15e2d77312bf207929ec876e9b227.zip
The first regex node now matches first
Before it was undefined, but now we always match the first defined node. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/parser/loaded_code.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/parser/loaded_code.rb b/spec/unit/parser/loaded_code.rb
index 16bd1be83..a280f9827 100644
--- a/spec/unit/parser/loaded_code.rb
+++ b/spec/unit/parser/loaded_code.rb
@@ -159,10 +159,11 @@ describe Puppet::Parser::LoadedCode do
@loader.node(nameout) == "bar"
end
- it "should return the first matching regex nodename" do
+ it "should return the first matching rgex nodename" do
@nodename1.stubs(:regex?).returns(true)
- @nodename1.expects(:match).returns(true)
- @nodename2.stubs(:regex?).returns(false)
+ @nodename1.stubs(:match).returns(true)
+ @nodename2.stubs(:regex?).returns(true)
+ @nodename2.stubs(:match).returns(true)
@loader.add_node(@nodename1, @node1)
@loader.add_node(@nodename2, @node2)