Sha256: 5f73043788ec9bfb3a637f367ec54466bd1de69028c37639842eb4c94602e321

Contents?: true

Size: 658 Bytes

Versions: 10

Compression:

Stored size: 658 Bytes

Contents

require_relative 'shared/a_predicate_ast_node'
class Predicate
  describe Factory, 'match' do
    include Factory

    context 'without options' do
      subject{ match(:name, "London") }

      it_should_behave_like "a predicate AST node"

      it{ should be_a(Match) }

      it{ should eql([:match, [:identifier, :name], [:literal, "London"]]) }
    end

    context 'with options' do
      subject{ match(:name, "London", case_sensitive: false) }

      it_should_behave_like "a predicate AST node"

      it{ should be_a(Match) }

      it{ should eql([:match, [:identifier, :name], [:literal, "London"], {case_sensitive: false}]) }
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
predicate-2.4.0 spec/factory/test_match.rb
predicate-2.3.3 spec/factory/test_match.rb
predicate-2.3.2 spec/factory/test_match.rb
predicate-2.3.1 spec/factory/test_match.rb
predicate-2.3.0 spec/factory/test_match.rb
predicate-2.2.1 spec/factory/test_match.rb
predicate-2.2.0 spec/factory/test_match.rb
predicate-2.1.0 spec/factory/test_match.rb
predicate-2.0.1 spec/factory/test_match.rb
predicate-2.0.0 spec/factory/test_match.rb