diff --git a/spec/deprecated/cache_config_spec.rb b/spec/deprecated/cache_config_spec.rb new file mode 100644 index 0000000..55dee2a --- /dev/null +++ b/spec/deprecated/cache_config_spec.rb @@ -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 diff --git a/spec/misc/deprecated_spec.rb b/spec/deprecated/proxy_config_spec.rb similarity index 54% rename from spec/misc/deprecated_spec.rb rename to spec/deprecated/proxy_config_spec.rb index b82b407..4ef9f94 100644 --- a/spec/misc/deprecated_spec.rb +++ b/spec/deprecated/proxy_config_spec.rb @@ -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 diff --git a/spec/requests/artist_spec.rb b/spec/models/artist_spec.rb similarity index 100% rename from spec/requests/artist_spec.rb rename to spec/models/artist_spec.rb diff --git a/spec/requests/release_group_spec.rb b/spec/models/release_group_spec.rb similarity index 100% rename from spec/requests/release_group_spec.rb rename to spec/models/release_group_spec.rb diff --git a/spec/requests/release_spec.rb b/spec/models/release_spec.rb similarity index 100% rename from spec/requests/release_spec.rb rename to spec/models/release_spec.rb diff --git a/spec/requests/track_spec.rb b/spec/models/track_spec.rb similarity index 100% rename from spec/requests/track_spec.rb rename to spec/models/track_spec.rb