Class: StatusTestRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/sfb_scripts/test_running/status_test_runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, ignore_selenium) ⇒ StatusTestRunner

Returns a new instance of StatusTestRunner.



8
9
10
11
12
13
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 8

def initialize(env, ignore_selenium)
  @repo = env[:repo]
  @shell = env[:shell]
  @test_runner = env[:test_runner]
  @ignore_selenium = ignore_selenium
end

Instance Attribute Details

#ignore_seleniumObject (readonly)

Returns the value of attribute ignore_selenium.



7
8
9
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 7

def ignore_selenium
  @ignore_selenium
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 7

def repo
  @repo
end

#shellObject (readonly)

Returns the value of attribute shell.



7
8
9
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 7

def shell
  @shell
end

#test_runnerObject (readonly)

Returns the value of attribute test_runner.



7
8
9
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 7

def test_runner
  @test_runner
end

#testsObject (readonly)

Returns the value of attribute tests.



7
8
9
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 7

def tests
  @tests
end

Class Method Details

.status(env, ignore_selenium = false) ⇒ Object



3
4
5
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 3

def self.status(env, ignore_selenium=false)
  new(env, ignore_selenium).status
end

Instance Method Details

#statusObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/sfb_scripts/test_running/status_test_runner.rb', line 15

def status
  files = repo.status_files.map {|f| {:file => f} }
  @tests = TestCollection.new(files)

  if tests.include_selenium?
    handle_selenium
  end

  if tests.empty?
    shell.notify 'No tests to run'
    exit
  end

  test_runner.run_files(tests)
end