Sha256: 4de14f8a892f7ce017e2f5adc334c0b0d34a9d8baebc7d9aeb1aa98c4a2d1619

Contents?: true

Size: 715 Bytes

Versions: 8

Compression:

Stored size: 715 Bytes

Contents

require 'valise'
require 'file-sandbox'

describe Valise, "glob handling" do
  include FileSandbox

  let :valise do
    sandbox.new :directory => "base/test"
    Valise::Set.define do
      handle "test/full", :yaml
      handle "**/*.file", :yaml
      handle "path/*.path", :yaml
      rw "base"
    end
  end

  it "should recognize based on a full path" do
    valise.serialization("test/full").should == Valise::Serialization::YAML
  end

  it "should recognize base on a file glob" do
    valise.serialization("test/by.file").should == Valise::Serialization::YAML
  end

  it "should recognize based on a path glob" do
    valise.serialization("path/by.path").should == Valise::Serialization::YAML
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
valise-0.8.2 spec/glob_handling.rb
valise-0.8.1 spec/glob_handling.rb
valise-0.8 spec/glob_handling.rb
valise-0.7 spec/glob_handling.rb
valise-0.6 spec/glob_handling.rb
valise-0.5 spec/glob_handling.rb
valise-0.4 spec/glob_handling.rb
valise-0.3 spec/glob_handling.rb