Class: NEC::MockServerStarter
- Inherits:
-
Object
- Object
- NEC::MockServerStarter
- Defined in:
- lib/nec_mock_server/mock_server_starter.rb
Constant Summary collapse
- RUN_SCRIPT_NAME =
'run.rb'
Instance Method Summary collapse
-
#initialize(sub_app_dir_path, opts = {}) ⇒ MockServerStarter
constructor
Create new instance of SubAppUnitTestHelper.
-
#run! ⇒ Object
The method start another sub application by defined path Sub app will be started in new command line with irb.
Constructor Details
#initialize(sub_app_dir_path, opts = {}) ⇒ MockServerStarter
Create new instance of SubAppUnitTestHelper
13 14 15 16 17 |
# File 'lib/nec_mock_server/mock_server_starter.rb', line 13 def initialize(sub_app_dir_path, opts = {}) @path = File.(sub_app_dir_path, File.dirname(__FILE__)) @run_scrip_name = opts.fetch(:run_scrip_name) {RUN_SCRIPT_NAME} @port = opts[:port] end |
Instance Method Details
#run! ⇒ Object
The method start another sub application by defined path Sub app will be started in new command line with irb
22 23 24 25 26 |
# File 'lib/nec_mock_server/mock_server_starter.rb', line 22 def run! return if @port && already_run? create_threat end |