Sha256: b8fc4c48ac9520999d9b665647ed91ffaf608b5dd9c08f7125032b66defd79c5

Contents?: true

Size: 883 Bytes

Versions: 1

Compression:

Stored size: 883 Bytes

Contents

require 'spec_helper'

describe HerokuResqueAutoScale::Config do

  before(:each) do
    HerokuResqueAutoScale.send(:remove_const, 'Config')
    load 'lib/heroku-resque-workers-scaler/config.rb'
  end

  context 'using the supplied config file' do
    it { HerokuResqueAutoScale::Config.thresholds.should be_instance_of Array }
    it { HerokuResqueAutoScale::Config.environments.should eql ['production','staging'] }
    it { HerokuResqueAutoScale::Config.worker_name.should eql 'worker' }
  end

  context 'with missing config values' do
    before :each do
      HerokuResqueAutoScale::Config.stub(:config).and_return({})
    end

    it { HerokuResqueAutoScale::Config.thresholds.should be_instance_of Array }
    it { HerokuResqueAutoScale::Config.environments.should eql ['production'] }
    it { HerokuResqueAutoScale::Config.worker_name.should eql 'worker' }

  end
end
  
  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heroku-resque-workers-scaler-0.2.0 spec/heroku-resque-workers-scaler/config_spec.rb