Commit 1b80068a authored by Chris Price's avatar Chris Price

Fix spec tests to be compatible with puppet 3.3

One of our spec tests mocks an object from the puppet object model.
In the latest version of puppet this object had a small API change;
our mock object was not set up to handle this correctly. This
commit should make the tests compatible with all versions of Puppet
from 2.7.x, 3.0.x, 3.1.x, 3.2.x, and 3.3.x.
parent 4e67235a
......@@ -45,14 +45,14 @@ describe processor do
context "#report_to_hash" do
let (:resource) {
resource = mock "resource"
resource.stubs(:path).returns("foo")
resource.stubs(:file).returns("foo")
resource.stubs(:line).returns("foo")
resource.stubs(:tags).returns([])
resource.stubs(:title).returns("foo")
resource.stubs(:type).returns("foo")
resource
stub("resource",
{ :pathbuilder => ["foo", "bar", "baz"],
:path => "foo",
:file => "foo",
:line => "foo",
:tags => [],
:title => "foo",
:type => "foo" })
}
let (:status) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment