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



8
9
10
11
12
13
14
# 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
  @status_tests = get_status_tests
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

#status_testsObject (readonly)

Returns the value of attribute status_tests.



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

def status_tests
  @status_tests
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

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



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

def status
  if status_tests.include_selenium?
    handle_selenium
  end

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

  test_runner.run_files(status_tests)
end