From 800a78b993f15e2d77312bf207929ec876e9b227 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 1 Sep 2009 00:20:15 -0700 Subject: 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 --- spec/unit/parser/loaded_code.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec/unit/parser') 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) -- cgit