Sha256: fb2cf461029b98f4f23d170a041d9d394f0b94eb582b73800013861e9c6254f3

Contents?: true

Size: 790 Bytes

Versions: 4

Compression:

Stored size: 790 Bytes

Contents

require File.join(File.dirname(__FILE__) + "/../bdrb_test_helper")
require File.join(File.dirname(__FILE__) + "/../bdrb_client_test_helper")

context "For BackgrounDRb config" do
  conf_file = File.join(File.dirname(__FILE__),"backgroundrb.yml")
  specify "should setup correct environment from cmd options" do
    BackgrounDRb::Config.parse_cmd_options(["-e", "production"])
    BackgrounDRb::Config.read_config(conf_file)
    ENV["RAILS_ENV"].should == "production"
    RAILS_ENV.should == "production"
  end

  specify "should setup correct environment from conf file" do
    ENV["RAILS_ENV"] = nil
    BackgrounDRb::Config.parse_cmd_options([])
    BackgrounDRb::Config.read_config(conf_file)
    ENV["RAILS_ENV"].should == "development"
    RAILS_ENV.should == "development"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
backgroundrb-rails3-1.1.3 test/client/test_bdrb_config.rb
backgroundrb-rails3-1.1.2 test/client/test_bdrb_config.rb
backgroundrb-rails3-1.1.1 test/client/test_bdrb_config.rb
backgroundrb-rails3-1.1 test/client/test_bdrb_config.rb