Sha256: a7ac33a164009765778f1b9e417df79adc2e3caa4868ef547fd79cfe6834d647

Contents?: true

Size: 692 Bytes

Versions: 20

Compression:

Stored size: 692 Bytes

Contents

require 'mattock/configuration-store'
require 'file-sandbox'

describe Mattock::ConfigurationStore do
  include FileSandbox
  let :store do
    described_class.new("test", "default_configs").tap do |store|
      store.register_search_path('./Rakefile')
    end
  end

  before :each do
    sandbox["default_configs/preferences.yaml"].contents = YAML::dump({"defaults" => "a", "local" => "b"})
    sandbox[".test/preferences.yaml"].contents = YAML::dump({"local" => "c"})
  end

  it "should make default configs available" do
    store.user_preferences["defaults"].should == "a"
  end

  it "should make local configs available" do
    store.user_preferences["local"].should == "c"
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mattock-0.10.1 spec/configuration-store.rb
mattock-0.10.0 spec/configuration-store.rb
mattock-0.9.0 spec/configuration-store.rb
mattock-0.8.0 spec/configuration-store.rb
mattock-0.7.1 spec/configuration-store.rb
mattock-0.7.0 spec/configuration-store.rb
mattock-0.5.3 spec/configuration-store.rb
mattock-0.5.2 spec/configuration-store.rb
mattock-0.5.0 spec/configuration-store.rb
mattock-0.4.1 spec/configuration-store.rb
mattock-0.4.0 spec/configuration-store.rb
mattock-0.3.4 spec/configuration-store.rb
mattock-0.3.3 spec/configuration-store.rb
mattock-0.3.2 spec/configuration-store.rb
mattock-0.3.1 spec/configuration-store.rb
mattock-0.3.0 spec/configuration-store.rb
mattock-0.2.13 spec/configuration-store.rb
mattock-0.2.12 spec/configuration-store.rb
mattock-0.2.11 spec/configuration-store.rb
mattock-0.2.10 spec/configuration-store.rb