Sha256: 2517880891a5f527f5fca9ca61d5abc2d920df64dbaf6734def8dea018622fe1

Contents?: true

Size: 761 Bytes

Versions: 6

Compression:

Stored size: 761 Bytes

Contents

# -*- encoding: utf-8 -*-

require "spec_helper"

describe MusicBrainz::Deprecated::CacheConfig do
  before(:all) {
    @old_cache_path = MusicBrainz.config.cache_path
  }

  before(:each) {
    MusicBrainz.config.cache_path = nil
  }

  after(:all) {
    MusicBrainz.config.cache_path = @old_cache_path
  }

  it "allows deprecated use of cache_path" do
    MusicBrainz.config.cache_path = "test1"

    MusicBrainz::Tools::Cache.cache_path.should == "test1"
    MusicBrainz.cache_path.should == "test1"
  end

  it "allows deprecated use of cache_path=" do
    MusicBrainz::Tools::Cache.cache_path = "test2"
    MusicBrainz.config.cache_path.should == "test2"

    MusicBrainz.cache_path = "test3"
    MusicBrainz.config.cache_path.should == "test3"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
musicbrainz-0.7.7 spec/deprecated/cache_config_spec.rb
musicbrainz-0.7.6 spec/deprecated/cache_config_spec.rb
musicbrainz-0.7.5 spec/deprecated/cache_config_spec.rb
musicbrainz-0.7.4 spec/deprecated/cache_config_spec.rb
musicbrainz-0.7.3 spec/deprecated/cache_config_spec.rb
musicbrainz-0.7.2 spec/deprecated/cache_config_spec.rb