summaryrefslogtreecommitdiff
path: root/spec/functions/rstrip_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functions/rstrip_spec.rb')
-rwxr-xr-xspec/functions/rstrip_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/functions/rstrip_spec.rb b/spec/functions/rstrip_spec.rb
index 81321d7..f6b4838 100755
--- a/spec/functions/rstrip_spec.rb
+++ b/spec/functions/rstrip_spec.rb
@@ -21,4 +21,13 @@ describe "the rstrip function" do
result = scope.function_rstrip([["a ","b ", "c "]])
expect(result).to(eq(['a','b','c']))
end
+
+ it "should accept objects which extend String" do
+ class AlsoString < String
+ end
+
+ value = AlsoString.new('asdf ')
+ result = scope.function_rstrip([value])
+ result.should(eq('asdf'))
+ end
end