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