Skip to content

Commit fc8f596

Browse files
committed
added specs for erl_call
1 parent e3a5d0a commit fc8f596

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Author:: Joe Williams (<joe@joetify.com>)
3+
# Copyright:: Copyright (c) 2009 Joe Williams
4+
# License:: Apache License, Version 2.0
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
20+
21+
describe Chef::Provider::Script, "action_run" do
22+
before(:each) do
23+
@node = mock("Chef::Node", :null_object => true)
24+
@new_resource = mock("Chef::Resource::ErlCall",
25+
:null_object => true,
26+
:code => "io:format(\"burritos~n\", []).",
27+
:interpreter => 'erl_call',
28+
:user => nil,
29+
:group => nil,
30+
:cookie => nil,
31+
:distributed => false,
32+
:name_type => "sname",
33+
:node_name => "chef@localhost"
34+
)
35+
@provider = Chef::Provider::ErlCall.new(@node, @new_resource)
36+
end
37+
38+
39+
40+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Author:: Joe Williams (<joe@joetify.com>)
3+
# Copyright:: Copyright (c) 2009 Joe Williams
4+
# License:: Apache License, Version 2.0
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
20+
21+
describe Chef::Resource::ErlCall do
22+
23+
before(:each) do
24+
@resource = Chef::Resource::ErlCall.new("fakey_fakerton")
25+
end
26+
27+
it "should create a new Chef::Resource::ErlCall" do
28+
@resource.should be_a_kind_of(Chef::Resource)
29+
@resource.should be_a_kind_of(Chef::Resource::ErlCall)
30+
end
31+
32+
it "should have a resource name of :erl_call" do
33+
@resource.resource_name.should eql(:erl_call)
34+
end
35+
36+
end

0 commit comments

Comments
 (0)