Sha256: af8382c96446c91887ae30db2d31717033d34b675ce66f98fc9eec34ae4589ca

Contents?: true

Size: 857 Bytes

Versions: 4

Compression:

Stored size: 857 Bytes

Contents

module InfinityTest
  class Runner
    attr_reader :options, :application

    def initialize(argv)
      @options = Options.new(argv)
      @application = InfinityTest.application
    end

    def run!
      load_configuration_file_or_read_the_options!
      if @options[:show_heuristics?]
        list_heuristics!
      else
        @application.run_global_commands!
        start_continuous_testing!
      end
    end

    def list_heuristics!
      @application.heuristics.patterns.keys.each do |pattern|
        puts %{- "#{pattern}"}
      end
      exit
    end

    def load_configuration_file_or_read_the_options!
      @application.load_configuration_file_or_read_the_options!(@options)
    end

    # Start Continuous Server using Watchr
    #
    def start_continuous_testing!
      InfinityTest::ContinuousTesting.new.start!
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
infinity_test-1.0.3 lib/infinity_test/runner.rb
infinity_test-1.0.2 lib/infinity_test/runner.rb
infinity_test-1.0.1 lib/infinity_test/runner.rb
infinity_test-1.0.0 lib/infinity_test/runner.rb