Sha256: 350a2f2d9845b15fed3d6d2c6d28418d61bc6c049548faf79623d745ab0dabc6

Contents?: true

Size: 465 Bytes

Versions: 19

Compression:

Stored size: 465 Bytes

Contents

describe 'Regexp assertions' do
  it 'matches the beginning of input' do
    /\Atext/.should =~ 'text'
    /\Atext/.should_not =~ 'the text'

    regexp = Regexp.new('\Atext')
    regexp.should =~ 'text'
    regexp.should_not =~ 'the text'
  end

  it 'matches the end of input' do
    /text\z/.should =~ 'the text'
    /text\z/.should_not =~ 'text of'

    regexp = Regexp.new('text\z')
    regexp.should =~ 'the text'
    regexp.should_not =~ 'text of'
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 spec/opal/core/regexp/assertions_spec.rb
opal-1.8.2 spec/opal/core/regexp/assertions_spec.rb
opal-1.8.1 spec/opal/core/regexp/assertions_spec.rb
opal-1.8.0 spec/opal/core/regexp/assertions_spec.rb
opal-1.8.0.beta1 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.4 spec/opal/core/regexp/assertions_spec.rb
opal-1.8.0.alpha1 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.3 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.2 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.1 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.0 spec/opal/core/regexp/assertions_spec.rb
opal-1.7.0.rc1 spec/opal/core/regexp/assertions_spec.rb
opal-1.6.1 spec/opal/core/regexp/assertions_spec.rb
opal-1.6.0 spec/opal/core/regexp/assertions_spec.rb
opal-1.6.0.rc1 spec/opal/core/regexp/assertions_spec.rb
opal-1.6.0.alpha1 spec/opal/core/regexp/assertions_spec.rb
opal-1.5.1 spec/opal/core/regexp/assertions_spec.rb
opal-1.5.0 spec/opal/core/regexp/assertions_spec.rb
opal-1.5.0.rc1 spec/opal/core/regexp/assertions_spec.rb