2012-07-08 22:37:46 +00:00
|
|
|
# -*- encoding: utf-8 -*-
|
|
|
|
|
2012-07-06 15:23:47 +00:00
|
|
|
require "spec_helper"
|
|
|
|
|
2013-01-15 19:09:34 +00:00
|
|
|
describe MusicBrainz::Deprecated::ProxyConfig do
|
2012-07-08 22:22:23 +00:00
|
|
|
before(:all) {
|
2012-10-12 12:45:51 +00:00
|
|
|
@old_query_interval = MusicBrainz.config.query_interval
|
2012-07-08 22:22:23 +00:00
|
|
|
}
|
|
|
|
|
2012-07-06 15:23:47 +00:00
|
|
|
before(:each) {
|
2012-10-12 12:45:51 +00:00
|
|
|
MusicBrainz.config.query_interval = nil
|
2012-07-06 15:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
after(:all) {
|
2012-10-12 12:45:51 +00:00
|
|
|
MusicBrainz.config.query_interval = @old_query_interval
|
2012-07-06 15:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
it "allows deprecated use of query_interval" do
|
2012-10-12 12:45:51 +00:00
|
|
|
MusicBrainz.config.query_interval = 2
|
|
|
|
|
|
|
|
MusicBrainz::Tools::Proxy.query_interval.should == 2
|
|
|
|
MusicBrainz.query_interval.should == 2
|
2012-07-08 22:22:23 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it "allows deprecated use of query_interval=" do
|
2012-10-12 12:45:51 +00:00
|
|
|
MusicBrainz::Tools::Proxy.query_interval = 3
|
|
|
|
MusicBrainz.config.query_interval.should == 3
|
|
|
|
|
|
|
|
MusicBrainz.query_interval = 4
|
|
|
|
MusicBrainz.config.query_interval.should == 4
|
2012-07-06 15:23:47 +00:00
|
|
|
end
|
|
|
|
end
|