Class: Seaweed::Runner
- Inherits:
-
Object
- Object
- Seaweed::Runner
- Defined in:
- lib/seaweed/runner.rb
Instance Method Summary collapse
-
#initialize(mode, options = {}, parser = nil) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(mode, options = {}, parser = nil) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/seaweed/runner.rb', line 7 def initialize mode, ={}, parser=nil Seaweed.load_configuration Seaweed.port = [:port] if [:port] if [:version] puts "Seaweed Version #{Seaweed::VERSION}" else case mode when 's', 'server' Seaweed.start_server when 'c', 'ci' Seaweed.spawn_server result = Seaweed.run_suite Seaweed.close_browser exit 1 unless result when 'a', 'auto' Seaweed.spawn_server Seaweed.run_suite Seaweed.watch_for_changes else puts parser || "Unknown mode “#{mode}”" end end end |