Class: InfinityTest::Runner
- Inherits:
-
Object
- Object
- InfinityTest::Runner
- Defined in:
- lib/infinity_test/runner.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Runner
constructor
A new instance of Runner.
- #list_heuristics! ⇒ Object
- #load_configuration_file_or_read_the_options! ⇒ Object
- #run! ⇒ Object
-
#start_continuous_testing! ⇒ Object
Start Continuous Server using Watchr.
Constructor Details
#initialize(argv) ⇒ Runner
Returns a new instance of Runner.
5 6 7 8 |
# File 'lib/infinity_test/runner.rb', line 5 def initialize(argv) @options = Options.new(argv) @application = InfinityTest.application end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
3 4 5 |
# File 'lib/infinity_test/runner.rb', line 3 def application @application end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/infinity_test/runner.rb', line 3 def @options end |
Instance Method Details
#list_heuristics! ⇒ Object
20 21 22 23 24 25 |
# File 'lib/infinity_test/runner.rb', line 20 def list_heuristics! @application.heuristics.patterns.keys.each do |pattern| puts %{- "#{pattern}"} end exit end |
#load_configuration_file_or_read_the_options! ⇒ Object
27 28 29 |
# File 'lib/infinity_test/runner.rb', line 27 def @application.(@options) end |
#run! ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/infinity_test/runner.rb', line 10 def run! if @options[:show_heuristics?] list_heuristics! else @application.run_global_commands! start_continuous_testing! end end |
#start_continuous_testing! ⇒ Object
Start Continuous Server using Watchr
33 34 35 |
# File 'lib/infinity_test/runner.rb', line 33 def start_continuous_testing! InfinityTest::ContinuousTesting.new.start! end |