summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/chars_spec.rb
blob: e4f26bc0cc207cd3ca1698349675d30f309a0055 (plain)
1
2
3
4
5
6
7
8
9
10
require_relative 'shared/chars'
require_relative 'shared/each_char_without_block'

describe "String#chars" do
  it_behaves_like :string_chars, :chars

  it "returns an array when no block given" do
    "hello".chars.should == ['h', 'e', 'l', 'l', 'o']
  end
end