1
0
Fork 0

Align directory structure of specs with lib.

This commit is contained in:
Mathias Gawlista 2013-01-15 20:09:34 +01:00
parent 18ba6bea34
commit 0d2c12ffc2
6 changed files with 33 additions and 19 deletions

View File

@ -0,0 +1,32 @@
# -*- 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

View File

@ -2,37 +2,19 @@
require "spec_helper"
describe MusicBrainz do
describe MusicBrainz::Deprecated::ProxyConfig do
before(:all) {
@old_cache_path = MusicBrainz.config.cache_path
@old_query_interval = MusicBrainz.config.query_interval
}
before(:each) {
MusicBrainz.config.cache_path = nil
MusicBrainz.config.query_interval = nil
}
after(:all) {
MusicBrainz.config.cache_path = @old_cache_path
MusicBrainz.config.query_interval = @old_query_interval
}
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
it "allows deprecated use of query_interval" do
MusicBrainz.config.query_interval = 2