Sha256: c43151e115703e3a0110a603a9e9b0097ebe66dcbfc20bfa1e65ac901f91a5b3

Contents?: true

Size: 878 Bytes

Versions: 7

Compression:

Stored size: 878 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Launcher do
    before do
      Configuration.stubs(:configure)
      Application.stubs(:start)
      Kernel.stubs(:exit)
      Kernel.stubs(:puts)
    end

    describe '.execute' do
      it { skip }
    end

    describe '#initialize' do
      it 'returns an instance of itself' do
        Launcher.new.must_be_instance_of(Launcher)
      end
    end

    describe '#execute!' do
      it 'returns 0 for successful execution' do
        Launcher.new.execute!.must_equal(0)
      end

      context 'when execution causes an uncaught exception' do
        before { Application.stubs(:start).raises(StandardError) }

        it 'returns 1 for unsuccessful execution' do
          skip 'This test is incorrect and fails.'

          Launcher.new.execute!.must_equal(1)
        end
      end
    end

  end # Launcher

end # Vedeu

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vedeu-0.2.11 test/lib/vedeu/launcher_test.rb
vedeu-0.2.10 test/lib/vedeu/launcher_test.rb
vedeu-0.2.9 test/lib/vedeu/launcher_test.rb
vedeu-0.2.8 test/lib/vedeu/launcher_test.rb
vedeu-0.2.7 test/lib/vedeu/launcher_test.rb
vedeu-0.2.6 test/lib/vedeu/launcher_test.rb
vedeu-0.2.5 test/lib/vedeu/launcher_test.rb