Method: Coveralls#start!

Defined in:
lib/coveralls.rb

#start!(simplecov_setting = 'test_frameworks', &block) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/coveralls.rb', line 58

def start!(simplecov_setting = 'test_frameworks', &block)
  if @@adapter == :simplecov
    ::SimpleCov.add_filter 'vendor'

    if simplecov_setting
      Coveralls::Output.puts("[Coveralls] Using SimpleCov's '#{simplecov_setting}' settings.", :color => "green")
      if block_given?
        ::SimpleCov.start(simplecov_setting) { instance_eval(&block)}
      else
        ::SimpleCov.start(simplecov_setting)
      end
    elsif block
      Coveralls::Output.puts("[Coveralls] Using SimpleCov settings defined in block.", :color => "green")
      ::SimpleCov.start { instance_eval(&block) }
    else
      Coveralls::Output.puts("[Coveralls] Using SimpleCov's default settings.", :color => "green")
      ::SimpleCov.start
    end
  end
end