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