Sha256: dd9b47157b30e6b1d39320a06cea8a22b19a64b4ea5752c48139d16a683ba33d

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

require 'spec_helper'
module Alf
  describe Reader::AlfFile do
    
    let(:io){ StringIO.new(expr) }
    def dataset(name)
      [{:status => 10},{:status => 30}]
    end
    subject{ Reader::AlfFile.new(io, self).to_a }

    describe "on pure functional expressions" do
      let(:expr){ "(restrict :suppliers, lambda{status > 20})" }
      it{ should == [{:status => 30}]}
    end

    describe "on impure functional expressions" do
      let(:expr){
      <<-EOF
        xxx = (restrict :suppliers, lambda{status > 20})
        (extend xxx, :rev => lambda{ -status })
      EOF
      }
      it{ should == [{:status => 30, :rev => -30}]}
    end
      
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-0.9.2 spec/unit/reader/test_alf_file.rb
alf-0.9.1 spec/unit/reader/test_alf_file.rb