Class: Teabag::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/teabag/configuration.rb

Defined Under Namespace

Classes: Suite

Constant Summary collapse

@@mount_at =
"/teabag"
@@root =

will default to Rails.root if left unset

nil
@@asset_paths =
["spec/javascripts", "spec/javascripts/stylesheets", "test/javascripts", "test/javascripts/stylesheets"]
@@fixture_path =
"spec/javascripts/fixtures"
@@suites =
{"default" => proc{}}
@@driver =
"phantomjs"
@@server =
nil
@@server_port =
nil
@@server_timeout =
20
@@fail_fast =
true
@@formatters =
"dot"
@@suppress_log =
false
@@color =
true
@@coverage =
false
@@coverage_reports =
nil

Class Method Summary collapse

Class Method Details

.coverage_reportsObject



51
52
53
54
55
# File 'lib/teabag/configuration.rb', line 51

def self.coverage_reports
  return ["text-summary"] if @@coverage_reports.blank?
  return @@coverage_reports if @@coverage_reports.is_a?(Array)
  @@coverage_reports.to_s.split(/,\s?/)
end

.formattersObject



57
58
59
60
61
# File 'lib/teabag/configuration.rb', line 57

def self.formatters
  return ["dot"] if @@formatters.blank?
  return @@formatters if @@formatters.is_a?(Array)
  @@formatters.to_s.split(/,\s?/)
end

.root=(path) ⇒ Object



43
44
45
# File 'lib/teabag/configuration.rb', line 43

def self.root=(path)
  @@root = Pathname.new(path.to_s) if path.present?
end

.suite(name = :default, &block) ⇒ Object



47
48
49
# File 'lib/teabag/configuration.rb', line 47

def self.suite(name = :default, &block)
  @@suites[name.to_s] = block
end