summaryrefslogtreecommitdiff
path: root/spec/unit/lwrp_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-18 13:47:49 -0700
committerJohn Keiser <john@johnkeiser.com>2015-05-18 13:59:06 -0700
commit05b07f669b9a06799e7e20608d1df3e5bbc2853a (patch)
treebe759c79a05c62466d456db014ce165e7098eb75 /spec/unit/lwrp_spec.rb
parentb64f37e42952caf744e46394dcc28ab7b7916431 (diff)
downloadchef-05b07f669b9a06799e7e20608d1df3e5bbc2853a.tar.gz
Fix LWRP instance.to_s to look like normal resources againjk/fix_lwrp_class_name
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