Sha256: 58effabcd71c23dc1759e6f6b8fb3415135078431f839892a49ebb159bd935ac

Contents?: true

Size: 329 Bytes

Versions: 23

Compression:

Stored size: 329 Bytes

Contents

describe "String#end_with?" do
  it "returns true only if ends with match" do
    s = "hello"
    s.end_with?('o').should be_true
    s.end_with?('llo').should be_true
    s.end_with?('ll').should be_false
  end

  it "returns true only if any ending match" do
    "hello".end_with?('x', 'y', 'llo', 'z').should be_true
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
opal-0.3.43 spec/rubyspec/core/string/end_with_spec.rb
opal-0.3.42 spec/core/string/end_with_spec.rb
opal-0.3.41 spec/core/string/end_with_spec.rb
opal-0.3.40 spec/core/string/end_with_spec.rb
opal-0.3.39 spec/core/string/end_with_spec.rb
opal-0.3.38 spec/core/string/end_with_spec.rb
opal-0.3.37 spec/core/string/end_with_spec.rb
opal-0.3.36 spec/core/string/end_with_spec.rb
opal-0.3.35 spec/core/string/end_with_spec.rb
opal-0.3.34 spec/core/string/end_with_spec.rb
opal-0.3.33 spec/core/string/end_with_spec.rb
opal-0.3.32 spec/core/string/end_with_spec.rb
opal-0.3.31 spec/core/string/end_with_spec.rb
opal-0.3.30 spec/core/string/end_with_spec.rb
opal-0.3.29 spec/core/string/end_with_spec.rb
opal-0.3.28 spec/core/string/end_with_spec.rb
opal-0.3.27 spec/core/string/end_with_spec.rb
opal-0.3.26 spec/core/string/end_with_spec.rb
opal-0.3.25 spec/core/string/end_with_spec.rb
opal-0.3.22 spec/core/string/end_with_spec.rb