Sha256: c3ce13191d71f1eeaf639b274fc3d95ed60f181b0994546fdd924ec89a7b2589

Contents?: true

Size: 1.16 KB

Versions: 31

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

require 'test_helper'

module Vedeu

  describe 'Bindings' do
    it { Vedeu.bound?(:_initialize_).must_equal(true) }
  end

  module Runtime

    describe Flags do

      let(:described) { Vedeu::Runtime::Flags }

      describe '.ready!' do
        it { described.ready!.must_equal(true) }
      end

      describe '.ready?' do
        context 'when Vedeu has triggered the :_initialize_ event' do
          before do
            described.reset!
            described.ready!
          end

          it { described.ready?.must_equal(true) }
        end

        context 'when Vedeu has not triggered the :_initialize_ event' do
          before do
            described.reset!
          end

          it { described.ready?.must_equal(false) }
        end
      end

      describe '.reset!' do
        subject { described.reset! }

        it do
          subject
          described.ready?.must_equal(false)
        end
      end

      describe '.reset' do
        it { described.must_respond_to(:reset) }
      end

      describe '.reset!' do
        it { described.must_respond_to(:reset!) }
      end

    end # Flags

  end # Runtime

end # Vedeu

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vedeu-0.8.12 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.10 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.9 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.8 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.7 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.6 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.5 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.4 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.3 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.2 test/lib/vedeu/runtime/flags_test.rb
vedeu-0.8.1 test/lib/vedeu/runtime/flags_test.rb