Sha256: 39b7ba070fcf96d25143b6a79da367f847d13d71a27649fedaf8f6193d792d8c

Contents?: true

Size: 764 Bytes

Versions: 1

Compression:

Stored size: 764 Bytes

Contents

require "spec_helper"

describe MusicBrainz::Deprecated::ProxyConfig do
  before(:all) {
    @old_query_interval = MusicBrainz.config.query_interval
  }

  before(:each) {
    MusicBrainz.config.query_interval = nil
  }

  after(:all) {
    MusicBrainz.config.query_interval = @old_query_interval
  }

  it "allows deprecated use of query_interval" do
    MusicBrainz.config.query_interval = 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
    expect(MusicBrainz.config.query_interval).to eq 3

    MusicBrainz.query_interval = 4
    expect(MusicBrainz.config.query_interval).to eq 4
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
musicbrainz-0.8.0 spec/deprecated/proxy_config_spec.rb