diff options
Diffstat (limited to 'spec/ruby/core/string/shared/to_a.rb')
-rw-r--r-- | spec/ruby/core/string/shared/to_a.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/string/shared/to_a.rb b/spec/ruby/core/string/shared/to_a.rb new file mode 100644 index 0000000000..bad3ea6584 --- /dev/null +++ b/spec/ruby/core/string/shared/to_a.rb @@ -0,0 +1,9 @@ +describe :string_to_a, shared: true do + it "returns an empty array for empty strings" do + "".send(@method).should == [] + end + + it "returns an array containing the string for non-empty strings" do + "hello".send(@method).should == ["hello"] + end +end |