Sha256: cee484fc3bf626d17fefb051c32a000a23b85ffe2254dc93a68a51c5333a863a

Contents?: true

Size: 694 Bytes

Versions: 7

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'
describe "path attributes in log" do
  
  let(:env){ Alf::Environment.folder(File.dirname(__FILE__)) }
    
  subject{ 
    Alf.lispy(env).evaluate <<-EOF
      (restrict :apache_combined, lambda{ path =~ /install.txt/ })
    EOF
  }
  
  specify {
    subject.should be_a(Alf::Relation)
    projected = subject.project([:path])
    projected.should == Alf::Relation[
      {:path => "/cart/install.txt" }, 
      {:path => "/store/install.txt"}
    ]
    projected.extend(:short_path => lambda{ path[0..1] }).should == Alf::Relation[
      {:path => "/cart/install.txt",  :short_path => "/c" }, 
      {:path => "/store/install.txt", :short_path => "/s"}
    ]
  }
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alf-0.12.2 spec/regression/logs/test_path_attribute.rb
alf-0.12.1 spec/regression/logs/test_path_attribute.rb
alf-0.12.0 spec/regression/logs/test_path_attribute.rb
alf-0.11.1 spec/regression/logs/test_path_attribute.rb
alf-0.11.0 spec/regression/logs/test_path_attribute.rb
alf-0.10.1 spec/regression/logs/test_path_attribute.rb
alf-0.10.0 spec/regression/logs/test_path_attribute.rb