Sha256: 63b9b8d58496ce546138bbdb10ef3399ef420f4f4a48eb0b1a4bc8a0a53bdbe8

Contents?: true

Size: 671 Bytes

Versions: 12

Compression:

Stored size: 671 Bytes

Contents

require 'childprocess'
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../../../lib/rest-assured/api/app_session', __FILE__)

module RestAssured
  describe AppSession do
    it 'starts application in childprocess' do
      cmdargs = %w{-d :memory: -p 6666}
      Config.stub(:to_cmdargs => cmdargs)

      ChildProcess.should_receive(:build).with('rest-assured', *cmdargs).and_return(child = mock(:io => mock))

      state = ''
      child.io.should_receive(:inherit!) do
        state.should_not == 'started'
      end
      child.should_receive(:start) do
        state << 'started'
      end

      AppSession.new
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rest-assured-1.2.1 spec/api/app_session_spec.rb
rest-assured-1.2.0 spec/api/app_session_spec.rb
rest-assured-1.1.10 spec/api/app_session_spec.rb
rest-assured-1.1.9 spec/api/app_session_spec.rb
rest-assured-1.1.8 spec/api/app_session_spec.rb
rest-assured-1.1.7 spec/api/app_session_spec.rb
rest-assured-1.1.6 spec/api/app_session_spec.rb
rest-assured-1.1.5 spec/api/app_session_spec.rb
rest-assured-1.1.4 spec/api/app_session_spec.rb
rest-assured-1.1.3 spec/api/app_session_spec.rb
rest-assured-1.1.2 spec/api/app_session_spec.rb
rest-assured-1.1.1 spec/api/app_session_spec.rb