Sha256: e6e0b6f3477a6915c5631e5550d171fc48baaf808fec675495b6574a97781ea2

Contents?: true

Size: 489 Bytes

Versions: 8

Compression:

Stored size: 489 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.lispy(Environment.examples).evaluate do
        (restrict (extend :suppliers, {:when => lambda{"notnow"}}), {:when => "now"})
      end.should eq(Relation::DUM)
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alf-0.12.2 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.12.1 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.12.0 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.11.1 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.11.0 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.10.1 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.10.0 spec/regression/restrict/test_restrict_with_keywords.rb
alf-0.9.3 spec/regression/restrict/test_restrict_with_keywords.rb