summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-08-01 23:32:57 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-08-02 16:38:49 +1000
commitd4d8372bf8174dfebcd6ae549710c9750b70bb30 (patch)
treeea6b7723e3aea0b1b43bd5a626eeb621a9810c11 /test
parentf7e1c36c6c0c03e1f969da7856828c92fdee2b61 (diff)
downloadpuppet-d4d8372bf8174dfebcd6ae549710c9750b70bb30.tar.gz
puppet-d4d8372bf8174dfebcd6ae549710c9750b70bb30.tar.xz
puppet-d4d8372bf8174dfebcd6ae549710c9750b70bb30.zip
Fixing a small test by stubbing instead of mocking
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/resource.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/language/resource.rb b/test/language/resource.rb
index 162880b0f..69e82fde4 100755
--- a/test/language/resource.rb
+++ b/test/language/resource.rb
@@ -39,9 +39,8 @@ class TestResource < PuppetTest::TestCase
params = res.instance_variable_get("@params")
# First test the simple case: It's already a parameter
- param = mock('param')
+ param = stub('param', :name => "pname")
param.expects(:is_a?).with(Resource::Param).returns(true)
- param.expects(:name).returns("pname")
res.send(:set_parameter, param)
assert_equal(param, params["pname"], "Parameter was not added to hash")