Sha256: 481edd7a36de77d957adde98116be8aeecd77236eb8af063026f8282b61ba265

Contents?: true

Size: 446 Bytes

Versions: 4

Compression:

Stored size: 446 Bytes

Contents

require 'spec_helper'
module Alf
  describe "(restrict xxx, :keyword => ...)" do

    it "should support using a keyword on Relation" do
      rel = Relation(when: "now")
      rel.restrict(when: "now").should eq(rel)
    end

    it "should support using a keyword on Lispy" do
      Alf.examples.query do
        (restrict (extend suppliers, {:when => lambda{"notnow"}}), {:when => "now"})
      end.should eq(Relation::DUM)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/regression/restrict/test_restrict_with_keywords.rb
alf-core-0.14.0 spec/regression/restrict/test_restrict_with_keywords.rb
alf-core-0.13.1 spec/regression/restrict/test_restrict_with_keywords.rb
alf-core-0.13.0 spec/regression/restrict/test_restrict_with_keywords.rb