lib/lopata/config.rb in lopata-0.0.16 vs lib/lopata/config.rb in lopata-0.1.0
- old
+ new
@@ -5,11 +5,13 @@
attr_accessor :build_number, :lopata_host, :lopata_code, :only_roles, :role_descriptions, :after_as,
:default_role, :ops, :after_scenario
def init(env)
require 'yaml'
- @config = YAML::load(File.open("./config/environments/#{env}.yml")) || {}
+ @config = {}
+ config_filename = "./config/environments/#{env}.yml"
+ @config = YAML::load(File.open(config_filename)) if File.exists?(config_filename)
init_db
@role_descriptions ||= {}
# init_includes
end
@@ -86,8 +88,12 @@
@before_start = block
end
def initialize_test
@before_start.call if @before_start
+ end
+
+ def world
+ @world ||= Lopata::World.new
end
end
end
\ No newline at end of file