Update to use modern RSpec syntax and conventions

* Replace `should` syntax with `expect` syntax.
* Add pry as a development dependency.
* Fix failing specs.
This commit is contained in:
Jason Voegele
2015-03-13 15:39:11 -04:00
parent 4d12555c09
commit ad4a53f9ce
14 changed files with 155 additions and 138 deletions
+4 -4
View File
@@ -18,15 +18,15 @@ describe MusicBrainz::Deprecated::CacheConfig do
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"
expect(MusicBrainz::Tools::Cache.cache_path).to eq "test1"
expect(MusicBrainz.cache_path).to eq "test1"
end
it "allows deprecated use of cache_path=" do
MusicBrainz::Tools::Cache.cache_path = "test2"
MusicBrainz.config.cache_path.should == "test2"
expect(MusicBrainz.config.cache_path).to eq "test2"
MusicBrainz.cache_path = "test3"
MusicBrainz.config.cache_path.should == "test3"
expect(MusicBrainz.config.cache_path).to eq "test3"
end
end
+4 -4
View File
@@ -18,15 +18,15 @@ describe MusicBrainz::Deprecated::ProxyConfig do
it "allows deprecated use of query_interval" do
MusicBrainz.config.query_interval = 2
MusicBrainz::Tools::Proxy.query_interval.should == 2
MusicBrainz.query_interval.should == 2
expect(MusicBrainz::Tools::Proxy.query_interval).to eq 2
expect(MusicBrainz.query_interval).to eq 2
end
it "allows deprecated use of query_interval=" do
MusicBrainz::Tools::Proxy.query_interval = 3
MusicBrainz.config.query_interval.should == 3
expect(MusicBrainz.config.query_interval).to eq 3
MusicBrainz.query_interval = 4
MusicBrainz.config.query_interval.should == 4
expect(MusicBrainz.config.query_interval).to eq 4
end
end