Sha256: 50b2ab5ae44b22f964a935b8a181e09e2e09468cf9ea52e1098c02515798323a

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

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

require "spec_helper"

describe MusicBrainz do
  before(:all) {
    @old_cache_path = MusicBrainz::Tools::Cache.cache_path
  }

  before(:each) {
    $stdout.stub!(:puts)
    MusicBrainz::Tools::Cache.cache_path = nil
  }

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

  it "allows deprecated use of cache_path" do
    MusicBrainz::Tools::Cache.cache_path = "some/path"
    MusicBrainz::cache_path.should == "some/path"
  end

  it "allows deprecated use of cache_path=" do
    MusicBrainz.cache_path = "some/path"
    MusicBrainz::Tools::Cache.cache_path.should == "some/path"
  end

  it "allows deprecated use of query_interval" do
    MusicBrainz::Tools::Proxy.query_interval = 2
    MusicBrainz::query_interval.should == 2
  end

  it "allows deprecated use of query_interval=" do
    MusicBrainz.query_interval = 2
    MusicBrainz::Tools::Proxy.query_interval.should == 2
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
musicbrainz-0.7.1 spec/misc/deprecated_spec.rb
musicbrainz-0.7.0 spec/misc/deprecated_spec.rb