summaryrefslogtreecommitdiff
path: root/spec/unit/lwrp_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/lwrp_spec.rb')
-rw-r--r--spec/unit/lwrp_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index ff7f8e7d7b..f5b6f32ff2 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -172,6 +172,14 @@ describe "LWRP" do
expect(get_lwrp(:lwrp_foo).new("blah").resource_name).to eql(:lwrp_foo)
end
+ it "should output the resource_name in .to_s" do
+ expect(get_lwrp(:lwrp_foo).new("blah").to_s).to eq "lwrp_foo[blah]"
+ end
+
+ it "should have a class that outputs a reasonable string" do
+ expect(get_lwrp(:lwrp_foo).to_s).to eq "LWRP resource lwrp_foo from cookbook lwrp"
+ end
+
it "should add the specified actions to the allowed_actions array" do
expect(get_lwrp(:lwrp_foo).new("blah").allowed_actions).to include(:pass_buck, :twiddle_thumbs)
end