Module: Teaspoon

Defined in:
lib/teaspoon/suite.rb,
lib/teaspoon/engine.rb,
lib/teaspoon/result.rb,
lib/teaspoon/runner.rb,
lib/teaspoon/server.rb,
lib/teaspoon/console.rb,
lib/teaspoon/utility.rb,
lib/teaspoon/version.rb,
lib/teaspoon/coverage.rb,
lib/teaspoon/exporter.rb,
lib/teaspoon/deprecated.rb,
lib/teaspoon/exceptions.rb,
lib/teaspoon/environment.rb,
lib/teaspoon/command_line.rb,
lib/teaspoon/drivers/base.rb,
lib/teaspoon/configuration.rb,
lib/teaspoon/formatters/base.rb,
lib/teaspoon/instrumentation.rb,
lib/teaspoon/drivers/selenium_driver.rb,
lib/teaspoon/drivers/phantomjs_driver.rb,
lib/teaspoon/formatters/dot_formatter.rb,
lib/teaspoon/formatters/tap_formatter.rb,
lib/teaspoon/formatters/json_formatter.rb,
lib/teaspoon/formatters/clean_formatter.rb,
lib/teaspoon/formatters/junit_formatter.rb,
lib/teaspoon/formatters/pride_formatter.rb,
lib/teaspoon/formatters/tap_y_formatter.rb,
lib/teaspoon/formatters/snowday_formatter.rb,
lib/teaspoon/formatters/teamcity_formatter.rb,
lib/teaspoon/formatters/modules/report_module.rb,
lib/teaspoon/formatters/documentation_formatter.rb,
lib/generators/teaspoon/install/install_generator.rb,
lib/teaspoon/formatters/swayze_or_oprah_formatter.rb

Defined Under Namespace

Modules: Drivers, Environment, ExceptionHandling, Formatters, Generators, SprocketsInstrumentation, Utility Classes: AssetNotServable, CommandLine, Configuration, Console, Coverage, DependencyFailure, Engine, EnvironmentNotFound, Error, Exporter, ExporterException, Failure, FileNotWritable, Instrumentation, MissingDependency, Result, Runner, RunnerException, Server, ServerException, Suite, SuiteController, ThresholdNotMet, UnknownDriver, UnknownDriverOptions, UnknownFormatter, UnknownFramework, UnknownSuite

Constant Summary collapse

RESULT_ATTRS =
[
  :type,
  :suite,
  :label,
  :status,
  :skipped,
  :link,
  :message,
  :trace,
  :elapsed,
  :total,
  :start,
  :level,
  :coverage,
  :original_json,
]
VERSION =
"0.8.0"
@@configured =
false
@@configuration =
Configuration

Class Method Summary collapse

Class Method Details

.configure {|@@configuration| ... } ⇒ Object

Yields:

  • (@@configuration)


180
181
182
183
184
# File 'lib/teaspoon/configuration.rb', line 180

def self.configure
  yield @@configuration
  @@configured = true
  @@configuration.override_from_env(ENV)
end

.dep(message, category = nil) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/teaspoon/deprecated.rb', line 9

def self.dep(message, category = nil)
  return if Teaspoon.configured
  if category
    return if @dep_notified[category]
    @dep_notified[category] = true if category
  end
  puts "WARNING: Deprecated - #{message}"
end

.setup(&block) ⇒ Object



3
4
5
6
# File 'lib/teaspoon/deprecated.rb', line 3

def self.setup(&block)
  Teaspoon.dep("Teaspoon.setup is deprecated, use Teaspoon.configure instead. The /initializer/teaspoon.rb file should be removed, and a new teaspoon_env.rb file should be created by running the install generator.")
  configure(&block)
end