Sha256: 2330f2afad4e97cb51ce6ab1045bb658ace1a6d3d0426d4f0719782f974d58a6

Contents?: true

Size: 422 Bytes

Versions: 11

Compression:

Stored size: 422 Bytes

Contents

require 'spec_helper'
class Predicate
  describe Predicate, "to_ruby_code" do

    subject{ p.to_ruby_code }

    describe "on a comp(:eq)" do
      let(:p){ Predicate.coerce(:x => 2) }

      it{ should eq("->(t){ t[:x] == 2 }") }
    end

    describe "with qualified identifiers" do
      let(:p){ Predicate.eq(Factory.qualified_identifier(:t, :y), 2) }

      it{ should eq("->(t){ t[:y] == 2 }") }
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
predicate-1.3.4 spec/predicate/test_to_ruby_code.rb
predicate-1.3.3 spec/predicate/test_to_ruby_code.rb
predicate-1.3.2 spec/predicate/test_to_ruby_code.rb
predicate-1.3.1 spec/predicate/test_to_ruby_code.rb
predicate-1.3.0 spec/predicate/test_to_ruby_code.rb
predicate-1.2.0 spec/predicate/test_to_ruby_code.rb
predicate-1.1.3 spec/predicate/test_to_ruby_code.rb
predicate-1.1.2 spec/predicate/test_to_ruby_code.rb
predicate-1.1.1 spec/predicate/test_to_ruby_code.rb
predicate-1.1.0 spec/predicate/test_to_ruby_code.rb
predicate-1.0.0 spec/predicate/test_to_ruby_code.rb