File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 :name => "test"
3434 )
3535
36- @provider = Chef ::Provider ::ErlCall . new ( @node , @new_resource )
36+ end
37+
38+ it "should return a Chef::Provider::ErlCall object" do
39+ provider = Chef ::Provider ::ErlCall . new ( @node , @new_resource )
40+ provider . should be_a_kind_of ( Chef ::Provider ::ErlCall )
3741 end
3842
3943end
Original file line number Diff line number Diff line change 3333 @resource . resource_name . should eql ( :erl_call )
3434 end
3535
36+ it "should have a default action of run" do
37+ @resource . action . should eql ( "run" )
38+ end
39+
40+ it "should accept run as an action" do
41+ lambda { @resource . action :run } . should_not raise_error ( ArgumentError )
42+ end
43+
44+ it "should allow you to set the code attribute" do
45+ @resource . code "q()."
46+ @resource . code . should eql ( "q()." )
47+ end
48+
49+ it "should allow you to set the cookie attribute" do
50+ @resource . cookie "nomnomnom"
51+ @resource . cookie . should eql ( "nomnomnom" )
52+ end
53+
54+ it "should allow you to set the distributed attribute" do
55+ @resource . distributed true
56+ @resource . distributed . should eql ( true )
57+ end
58+
59+ it "should allow you to set the name_type attribute" do
60+ @resource . name_type "sname"
61+ @resource . name_type . should eql ( "sname" )
62+ end
63+
64+ it "should allow you to set the node_name attribute" do
65+ @resource . node_name "chef@erlang"
66+ @resource . node_name . should eql ( "chef@erlang" )
67+ end
68+
3669end
You can’t perform that action at this time.
0 commit comments