Sha256: 4a9ba87ca363c886578fe0114074ff022f4d154012d1e54c7b4406c9f46b4797

Contents?: true

Size: 1.21 KB

Versions: 41

Compression:

Stored size: 1.21 KB

Contents

require 'test_helper'

module Vedeu

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

  module Output

    describe Refresh do

      let(:described) { Vedeu::Output::Refresh }
      let(:instance)  { described.new }

      describe '.all' do
        before { Vedeu.stubs(:trigger) }

        subject { described.all }

        it { subject.must_be_instance_of(Array) }

        context 'when there are no registered interfaces' do
          before { Vedeu.interfaces.reset }

          it { subject.must_equal([]) }
        end

        context 'when there are registered interfaces' do
          let(:interface)  {
            Vedeu::Interfaces::Interface.new(name: 'Vedeu::Output::Refresh')
          }
          let(:interfaces) { [interface] }

          before { Vedeu.interfaces.stubs(:zindexed).returns(interfaces) }

          it {
            Vedeu.expects(:trigger).with(:_refresh_view_,
                                         'Vedeu::Output::Refresh')
            subject
          }

          it { subject.must_equal([interface]) }
        end
      end

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

    end # Refresh

  end # Output

end # Vedeu

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
vedeu-0.6.71 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.70 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.69 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.68 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.67 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.66 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.65 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.64 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.63 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.62 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.61 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.60 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.59 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.58 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.57 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.56 test/lib/vedeu/output/refresh_test.rb
vedeu-0.6.54 test/lib/vedeu/output/refresh/refresh_test.rb
vedeu-0.6.53 test/lib/vedeu/output/refresh/refresh_test.rb
vedeu-0.6.52 test/lib/vedeu/output/refresh/refresh_test.rb
vedeu-0.6.51 test/lib/vedeu/output/refresh/refresh_test.rb