Sha256: 7720f8548bd9c7c42b552fc0958119c0370c62e40f0f23908e0f14a6bdfdc5e5

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 Bytes

Contents

require_relative '../../../test_helper'

module Vedeu
  describe EventLoop do
    let(:described_class) { EventLoop }
    let(:defined)         { mock }
    let(:subject)         { described_class.new }

    before do
      Input.stubs(:capture)
      Process.stubs(:evaluate).raises(Collapse)
      Output.stubs(:render)
    end

    it 'returns an EventLoop instance' do
      subject.must_be_instance_of(EventLoop)
    end

    it 'sets an instance variable' do
      subject.instance_variable_get("@running").must_equal(true)
    end

    describe '.main_sequence' do
      let(:subject) { described_class.main_sequence }

      it 'returns a FalseClass' do
        subject.must_be_instance_of(FalseClass)
      end
    end

    describe '#stop' do
      let(:subject) { described_class.new.stop }

      it 'returns a FalseClass' do
        subject.must_be_instance_of(FalseClass)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.0.18 test/lib/vedeu/support/event_loop_test.rb
vedeu-0.0.17 test/lib/vedeu/process/event_loop_test.rb
vedeu-0.0.16 test/lib/vedeu/process/event_loop_test.rb
vedeu-0.0.15 test/lib/vedeu/process/event_loop_test.rb