Permalink
Browse files

Merge pull request #309 from junaruga/feature/fix-test-for-etc-rc.d-thin

Fix test suite for the case /etc/rc.d exists.
  • Loading branch information...
2 parents f478896 + 668e69b commit 50611c530fd0b116ece6215510f4bdd07c16fd50 @macournoyer committed May 18, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/controllers/service_spec.rb
@@ -27,8 +27,10 @@
@service.install
File.exist?(Service::INITD_PATH).should be_true
+ script_name = File.directory?('/etc/rc.d') ?
+ '/etc/rc.d/thin' : '/etc/init.d/thin'
File.read(Service::INITD_PATH).should include('CONFIG_PATH=tmp/sandbox/etc/thin',
- 'SCRIPT_NAME=tmp/sandbox/etc/init.d/thin',
+ 'SCRIPT_NAME=tmp/sandbox' + script_name,
'DAEMON=' + Command.script)
end

0 comments on commit 50611c5

Please sign in to comment.