Sha256: 343ac6789a16fcb3741dd97fd983c90a141c503fc599c9a198a8399be3b7b1bc

Contents?: true

Size: 1.79 KB

Versions: 38

Compression:

Stored size: 1.79 KB

Contents

# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited. Any use of this program by an authorized
# licensee is strictly subject to the terms and conditions,
# including confidentiality obligations, set forth in the applicable
# License Agreement between RightScale.com, Inc. and
# the licensee

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))

describe RightConf::PassengerConfigurator do

  before(:each) do
    @configurator = create_configurator('passenger {}')
  end

  it 'should default to /opt/nginx when possible' do
    flexmock(File).should_receive(:exist?).with('/opt/nginx').once.and_return(true)
    flexmock(File).should_receive(:exist?).with('/opt').once.and_return(true)
    flexmock(File).should_receive(:writable?).with('/opt/nginx').once.and_return(true)
    @configurator.__send__(:default_install_path).should == '/opt/nginx'
  end

  it 'should set defaults' do
    flexmock(File).should_receive(:exist?).with('/opt/nginx').twice.and_return(true)
    flexmock(File).should_receive(:exist?).with('/opt').twice.and_return(true)
    flexmock(File).should_receive(:writable?).with('/opt/nginx').twice.and_return(true)
    @configurator.__send__(:set_defaults)
    @configurator.right_site_src_path.should == Dir.getwd
    @configurator.library_src_path.should == File.expand_path(File.join(Dir.getwd, '..', 'library'))
    @configurator.gem_version.should == RightConf::PassengerConfigurator::PASSENGER_GEM_VERSION
    @configurator.install_path.should == @configurator.__send__(:default_install_path)
    @configurator.user.should == ENV['USER']
  end

end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
rconf-0.8.13 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.12 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.11 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.10 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.9 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.8 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.5 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.4 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.3 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.2 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.1 spec/configurators/passenger_configurator_spec.rb
rconf-0.8.0 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.15 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.13 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.12 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.11 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.10 spec/configurators/passenger_configurator_spec.rb
rconf-0.7.9 spec/configurators/passenger_configurator_spec.rb