spec/lib/rda/nginx_spec.rb in rda-0.3.0 vs spec/lib/rda/nginx_spec.rb in rda-0.3.1
- old
+ new
@@ -3,10 +3,12 @@
describe Rda::Nginx do
subject { Rda::Nginx.new }
before do
Rda.configure { nginx_conf_paths ['/etc/nginx', '/usr/local/nginx/conf', '/opt/nginx/conf'] }
+
+ Dir.chdir(File.join(File.dirname(__FILE__), '../../dummy'))
end
describe '#setup' do
context 'when nginx is not found' do
before do
@@ -72,10 +74,10 @@
it 'discards the settings' do
subject.should_receive(:gsub_file).with("/etc/hosts", "127.0.0.1 dummy.local", '')
%W(enabled available).each do |n|
subject.should_receive(:remove_file).with("#{dummy_path}/sites-#{n}/dummy.local")
end
- subject.should_receive(:remove_file).with("#{::Rails.root}/config/setup_load_paths.rb")
+ subject.should_receive(:remove_file).with("#{Rda::Rails.root}/config/setup_load_paths.rb")
subject.discard
end
end
end