Class: Tester
- Inherits:
-
Object
- Object
- Tester
- Defined in:
- lib/tester.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
Class Method Summary collapse
- .find(inputs, options) ⇒ Object
- .needs ⇒ Object
- .status(options) ⇒ Object
- .status_check(options) ⇒ Object
Instance Method Summary collapse
- #find(inputs) ⇒ Object
-
#initialize(env) ⇒ Tester
constructor
A new instance of Tester.
- #status(options) ⇒ Object
- #status_check(options) ⇒ Object
Constructor Details
#initialize(env) ⇒ Tester
Returns a new instance of Tester.
29 30 31 |
# File 'lib/tester.rb', line 29 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
28 29 30 |
# File 'lib/tester.rb', line 28 def env @env end |
Class Method Details
.find(inputs, options) ⇒ Object
13 14 15 16 |
# File 'lib/tester.rb', line 13 def self.find(inputs, ) env = NeedsManager.configure(:test_runner, needs, .merge(repo_type: :info)) new(env).find(inputs) end |
.needs ⇒ Object
9 10 11 |
# File 'lib/tester.rb', line 9 def self.needs [:shell, :repo, :test_runner] end |
.status(options) ⇒ Object
18 19 20 21 |
# File 'lib/tester.rb', line 18 def self.status() env = NeedsManager.configure(:test_runner, needs, .merge(repo_type: :info)) new(env).status() end |
.status_check(options) ⇒ Object
23 24 25 26 |
# File 'lib/tester.rb', line 23 def self.status_check() env = NeedsManager.configure(:test_runner, (needs - [:test_runner]), .merge(repo_type: :info)) new(env).status_check() end |
Instance Method Details
#find(inputs) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/tester.rb', line 33 def find(inputs) # each of these replaces this process if successful # so no need for logic control flow if query_might_be_method?(inputs) TestMethodRunner.run(inputs.first, env) end TestFileRunner.find(inputs, env) env[:shell].warn "Giving up :(" end |
#status(options) ⇒ Object
43 44 45 |
# File 'lib/tester.rb', line 43 def status() TestFileRunner.status(env, [:no_selenium]) end |
#status_check(options) ⇒ Object
47 48 49 |
# File 'lib/tester.rb', line 47 def status_check() StatusChecker.report(env, [:confirm_exit_status]) end |