Sha256: eece2ec2df63d2822cf80a324b21c81927e425ac0c3ae23936a5af737a217dfb

Contents?: true

Size: 440 Bytes

Versions: 49

Compression:

Stored size: 440 Bytes

Contents

describe "Literal Regexps" do
  it "yields a Regexp" do
    /Hello/.should be_kind_of(Regexp)
  end
end

describe "Regexps with interpolation" do
  it "allows interpolation of strings" do
    str = "foo|bar"
    /#{str}/.should == /foo|bar/
  end

  it "allows interpolation to interact with other Regexp constructs" do
    str = "foo)|(bar"
    /(#{str})/.should == /(foo)|(bar)/

    str = "a"
    /[#{str}-z]/.should == /[a-z]/
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
opal-0.4.2 spec/rubyspec/language/regexp_spec.rb
opal-0.4.1 spec/rubyspec/language/regexp_spec.rb
opal-0.4.0 spec/rubyspec/language/regexp_spec.rb
opal-0.3.44 spec/rubyspec/language/regexp_spec.rb
opal-0.3.43 spec/rubyspec/language/regexp_spec.rb
opal-0.3.42 spec/language/regexp_spec.rb
opal-0.3.41 spec/language/regexp_spec.rb
opal-0.3.40 spec/language/regexp_spec.rb
opal-0.3.39 spec/language/regexp_spec.rb
opal-0.3.38 spec/language/regexp_spec.rb
opal-0.3.37 spec/language/regexp_spec.rb
opal-0.3.36 spec/language/regexp_spec.rb
opal-0.3.35 spec/language/regexp_spec.rb
opal-0.3.34 spec/language/regexp_spec.rb
opal-0.3.33 spec/language/regexp_spec.rb
opal-0.3.32 spec/language/regexp_spec.rb
opal-0.3.31 spec/language/regexp_spec.rb
opal-0.3.30 spec/language/regexp_spec.rb
opal-0.3.29 spec/language/regexp_spec.rb
opal-0.3.28 spec/language/regexp_spec.rb