Class: Railscheck::Test::Config

Inherits:
Railscheck::TestCase show all
Defined in:
lib/test/tc_config.rb

Instance Method Summary collapse

Methods inherited from Railscheck::TestCase

#default_test

Instance Method Details

#test_all_yaml_can_parseObject

Test that every yaml file in the project can parse (except vendor plugins/rails).



7
8
9
10
11
12
13
# File 'lib/test/tc_config.rb', line 7

def test_all_yaml_can_parse  
  (Dir["#{RAILS_ROOT}/**/*.yml"]-Dir["#{RAILS_ROOT}/vendor/**/*.yml"]-version_control_excludes).each do |fname|
    assert_nothing_raised("Could not parse file \"#{fname}\".") do
      raise StandardError.new("Parse failed") if YAML.parse_file(fname)==nil
    end
  end
end