Sha256: d915e1c77dc0d1b712b50852058f97c25b66072ac60849ac365792747201587f

Contents?: true

Size: 568 Bytes

Versions: 26

Compression:

Stored size: 568 Bytes

Contents

require "spec_helper"

describe DataMapper::Parse::Conditions::Regex do
  let(:regex) { described_class.new value }

  describe "#options" do
    subject { regex.options }

    context "when case insensitive option is on" do
      let(:value) { /bbq/i }
      it { should eq("i") }
    end

    context "when multiline option is on" do
      let(:value) { /bbq/m }
      it { should eq("m") }
    end

    context "when both case insensitive and multiline option is on" do
      let(:value) { /bbq/mi }
      it { should eq("im") }
    end
  end # #regex_options

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
dm-parse-0.3.20 spec/query_spec.rb
dm-parse-0.3.19 spec/query_spec.rb
dm-parse-0.3.18 spec/query_spec.rb
dm-parse-0.3.17 spec/query_spec.rb
dm-parse-0.3.16 spec/query_spec.rb
dm-parse-0.3.15 spec/query_spec.rb
dm-parse-0.3.14 spec/query_spec.rb
dm-parse-0.3.13 spec/query_spec.rb
dm-parse-0.3.12 spec/query_spec.rb
dm-parse-0.3.11 spec/query_spec.rb
dm-parse-0.3.10 spec/query_spec.rb
dm-parse-0.3.9 spec/query_spec.rb
dm-parse-0.3.8 spec/query_spec.rb
dm-parse-0.3.7 spec/query_spec.rb
dm-parse-0.3.6 spec/query_spec.rb
dm-parse-0.3.5 spec/query_spec.rb
dm-parse-0.3.4 spec/query_spec.rb
dm-parse-0.3.3 spec/query_spec.rb
dm-parse-0.3.2 spec/query_spec.rb
dm-parse-0.3.1 spec/query_spec.rb