summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/empty_spec.rb
blob: 8e53a16afc29090a432bb061437d4ac452c65827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "String#empty?" do
  it "returns true if the string has a length of zero" do
    "hello".should_not.empty?
    " ".should_not.empty?
    "\x00".should_not.empty?
    "".should.empty?
    StringSpecs::MyString.new("").should.empty?
  end
end