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