Permalink
Browse files

You can't use File.open like that. Broken code.

  • Loading branch information...
sinn3r committed Jan 10, 2013
1 parent 11642dc commit 2b17a040acef0741fb44781057ebf8be6f85d1a5
Showing with 8 additions and 5 deletions.
  1. +8 −5 test/features/support/test_config.rb
@@ -5,11 +5,14 @@ class TestConfig
include Singleton
def initialize(*args)
- if @yaml_options = YAML::load(File.open(File.join(File.dirname(__FILE__),'test_config.yml')))
-
- else
- @yaml_options = {}
- end
+
+ yml_path = File.join(File.dirname(__FILE__),'test_config.yml')
+
+ if File.exists?(yml_path)
+ @yaml_options = YAML::load(File.open(yml_path))
+ else
+ @yaml_options = {}
+ end
@options = {
"rhost" => "localhost",

0 comments on commit 2b17a04

Please sign in to comment.