blob: f0d9bc2de33fb1725e13563f8686596f5a9e3845 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 | require 'bundler'
begin
  require 'simplecov'
  SimpleCov.start do
    add_filter '/test/'
    add_filter '/vendor/' # for travis-ci
    add_filter do |source_file|
      source_file.lines.count < 15
    end
    # MRI and JRuby report ~74%, Rubinius reports ~85%
    # (source: https://travis-ci.org/zenhob/hcl)
    minimum_coverage case RUBY_ENGINE when "rbx" then 84 else 74 end
  end
rescue LoadError => e
  $stderr.puts 'No test coverage tools found, skipping coverage check.'
end
require 'test/unit'
require 'mocha/setup'
require 'fileutils'
require 'fakeweb'
# override the default hcl dir
ENV['HCL_DIR'] = File.dirname(__FILE__)+"/dot_hcl"
require 'hcl'
 |