Sha256: da96f54917541769ab776a640b6a85f28d6817817ebbfda20f16d79e735eabb9

Contents?: true

Size: 1.12 KB

Versions: 15

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

module YourApp

  class SomeController
  end # SomeController

end # YourApp

module Vedeu

  describe Bootstrap do

    let(:described)   { Vedeu::Bootstrap }
    let(:instance)    { described.new(argv, entry_point) }
    let(:argv)        { [] }
    let(:entry_point) { YourApp::SomeController.new }

    describe '#initialize' do
      it { instance.must_be_instance_of(described) }
      it { instance.instance_variable_get('@argv').must_equal(argv) }
      it do
        instance.instance_variable_get('@entry_point').must_equal(entry_point)
      end
    end

    describe '.start' do
      before { Vedeu::Launcher.stubs(:execute!) }

      subject { described.start(argv, entry_point) }

      it {
        Vedeu::Launcher.expects(:execute!)
        subject
      }

      context 'when the entry point is not set' do
        let(:entry_point) {}

        it 'tries to use the Configuration.root setting' do
          Vedeu::Configuration.expects(:root)
          subject
        end
      end
    end

    describe '#start' do
      it { instance.must_respond_to(:start) }
    end

  end # Bootstrap

end # Vedeu

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.5.11 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.10 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.9 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.8 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.7 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.6 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.5 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.4 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.3 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.2 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.1 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.5.0 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.4.65 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.4.64 test/lib/vedeu/runtime/bootstrap_test.rb
vedeu-0.4.63 test/lib/vedeu/runtime/bootstrap_test.rb