Class: Spork::Server::RSpec

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

Constant Summary collapse

RSPEC_PORT =
8989
RSPEC_HELPER_FILE =
File.join(Dir.pwd, "spec/spec_helper.rb")

Constants inherited from Spork::Server

BOOTSTRAP_FILE, LOAD_PREFERENCE

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, using_rails?

Class Method Details

.helper_fileObject



9
10
11
# File 'lib/spork/server/rspec.rb', line 9

def self.helper_file
  RSPEC_HELPER_FILE
end

.portObject



5
6
7
# File 'lib/spork/server/rspec.rb', line 5

def self.port
  RSPEC_PORT
end

Instance Method Details

#run_tests(argv, stderr, stdout) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/spork/server/rspec.rb', line 13

def run_tests(argv, stderr, stdout)
  ::Spec::Runner::CommandLine.run(
    ::Spec::Runner::OptionParser.parse(
      argv,
      stderr,
      stdout
    )
  )
end