| ... | ... |
@@ -4,9 +4,12 @@ require_relative "rubysermon/mod_template" |
| 4 | 4 |
require_relative "rubysermon/configurator" |
| 5 | 5 |
|
| 6 | 6 |
module Rubysermon |
| 7 |
+ LIB_PATH = File.expand_path(File.dirname(__FILE__)) |
|
| 8 |
+ APP_PATH = "#{LIB_PATH}/.."
|
|
| 9 |
+ |
|
| 7 | 10 |
class App |
| 8 | 11 |
|
| 9 |
- @config_path = "#{Dir.pwd}/config.json"
|
|
| 12 |
+ @config_path = "#{APP_PATH}/config.json"
|
|
| 10 | 13 |
@config |
| 11 | 14 |
@loader |
| 12 | 15 |
|
| ... | ... |
@@ -3,7 +3,7 @@ require_relative '../../test_helper.rb' |
| 3 | 3 |
class Configurator_test < MiniTest::Unit::TestCase |
| 4 | 4 |
|
| 5 | 5 |
def test_load_config |
| 6 |
- config_file = "../../fixtures/config.json" |
|
| 6 |
+ config_file = "#{Rubysermon::APP_PATH}/test/fixtures/config.json"
|
|
| 7 | 7 |
configurator = Rubysermon::Configurator.new(config_file) |
| 8 | 8 |
|
| 9 | 9 |
loaded_settings = configurator.get_settings() |