summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/shared/to_a.rb
blob: bad3ea6584b613ca413cf72c434a6e842e75a7a0 (plain)
1
2
3
4
5
6
7
8
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