Class: Spork::Server::Cucumber

Inherits:
Spork::Server show all
Defined in:
lib/spork/server/cucumber.rb

Constant Summary collapse

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

Constants inherited from Spork::Server

BOOTSTRAP_FILE, LOAD_PREFERENCE

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Spork::Server

available?, available_servers, bootstrap, bootstrapped?, #helper_file, inherited, #listen, load_preference_index, #port, run, #run, #running?, server_name, supported_servers

Methods included from CustomIOStreams

included, #stderr, #stdout

Class Attribute Details

.step_motherObject

Returns the value of attribute step_mother.



14
15
16
# File 'lib/spork/server/cucumber.rb', line 14

def step_mother
  @step_mother
end

Class Method Details

.helper_fileObject



10
11
12
# File 'lib/spork/server/cucumber.rb', line 10

def helper_file
  CUCUMBER_HELPER_FILE
end

.portObject



6
7
8
# File 'lib/spork/server/cucumber.rb', line 6

def port
  CUCUMBER_PORT
end

Instance Method Details

#run_tests(argv, stderr, stdout) ⇒ Object



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

def run_tests(argv, stderr, stdout)
  require 'cucumber/cli/main'
  ::Cucumber::Cli::Main.step_mother = step_mother
  ::Cucumber::Cli::Main.new(argv, stdout, stderr).execute!(step_mother)
end

#step_motherObject



17
18
19
# File 'lib/spork/server/cucumber.rb', line 17

def step_mother
  self.class.step_mother
end