Class: Spork::TestFramework::Cucumber

Inherits:
Spork::TestFramework show all
Defined in:
lib/spork/test_framework/cucumber.rb

Constant Summary

DEFAULT_PORT =
8990
HELPER_FILE =
File.join(Dir.pwd, "features/support/env.rb")

Constants inherited from Spork::TestFramework

BOOTSTRAP_FILE, LOAD_PREFERENCE

Class Attribute Summary (collapse)

Attributes inherited from Spork::TestFramework

#stderr, #stdout

Instance Method Summary (collapse)

Methods inherited from Spork::TestFramework

available?, available_test_frameworks, #bootstrap, #bootstrapped?, #default_port, default_port, #entry_point, factory, #helper_file, helper_file, #initialize, load_preference_index, #short_name, short_name, supported_test_frameworks

Constructor Details

This class inherits a constructor from Spork::TestFramework

Class Attribute Details

+ (Object) mother_object

REMOVE WHEN SUPPORT FOR 0.3.95 AND EARLIER IS DROPPED



7
8
9
# File 'lib/spork/test_framework/cucumber.rb', line 7

def mother_object
  @mother_object
end

Instance Method Details

- (Object) preload



10
11
12
13
14
15
16
17
18
# File 'lib/spork/test_framework/cucumber.rb', line 10

def preload
  require 'cucumber'
  if ::Cucumber::VERSION >= '0.9.0' && ::Cucumber::VERSION < '1.0.0'
    # nothing to do nowadays
  else
    preload_legacy_cucumbers
  end
  super
end

- (Object) run_tests(argv, stderr, stdout)



20
21
22
23
24
25
26
# File 'lib/spork/test_framework/cucumber.rb', line 20

def run_tests(argv, stderr, stdout)
  if ::Cucumber::VERSION >= '0.9.0'  && ::Cucumber::VERSION < '1.0.0'
    ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!
  else
    ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!(@step_mother)
  end
end