Module: CucumberMonitor

Defined in:
lib/cucumber_monitor.rb,
lib/cucumber_monitor/base.rb,
lib/cucumber_monitor/step.rb,
lib/cucumber_monitor/engine.rb,
lib/cucumber_monitor/context.rb,
lib/cucumber_monitor/version.rb,
lib/cucumber_monitor/scenario.rb,
lib/cucumber_monitor/definition.rb,
lib/cucumber_monitor/feature_file.rb,
lib/cucumber_monitor/feature_runner.rb,
lib/cucumber_monitor/step_definition_file.rb

Defined Under Namespace

Classes: Base, Context, Definition, Engine, FeatureFile, FeatureRunner, Scenario, Step, StepDefinitionFile

Constant Summary collapse

VERSION =
"0.0.8"

Class Method Summary collapse

Class Method Details

.app_test_dirObject



26
27
28
# File 'lib/cucumber_monitor.rb', line 26

def self.app_test_dir
  "/test/dummy" if Rails.env == 'test'
end

.cucumber_rails_ready?Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
# File 'lib/cucumber_monitor.rb', line 30

def self.cucumber_rails_ready?
  files = [
            "#{path}/script/cucumber",
            "#{path}/features",
            "#{path}/lib/tasks/cucumber.rake"
          ]
  files.all? { |f| File.exist?(f) } && YAML.load_file("#{path}/config/database.yml").has_key?("cucumber")
end

.newObject



18
19
20
# File 'lib/cucumber_monitor.rb', line 18

def self.new
  CucumberMonitor::Base.new
end

.pathObject



22
23
24
# File 'lib/cucumber_monitor.rb', line 22

def self.path
  (Rails.root.to_s if defined?(Rails)) || "#{CucumberMonitor::Engine.root}#{app_test_dir}"
end