Sha256: e820c280e4ae5458edd14d40b0f543f8066785aa5a40da7c25f292b6b77dc29e

Contents?: true

Size: 876 Bytes

Versions: 2

Compression:

Stored size: 876 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Refresh do

    before { Interfaces.reset }

    describe '.all' do
      it 'returns an empty collection when there are no registered ' \
         'interfaces' do
        Refresh.all.must_equal([])
      end
    end

    describe '.by_focus' do
      it 'raises an exception when there are no registered interfaces' do
        Focus.reset

        proc { Refresh.by_focus }.must_raise(NoInterfacesDefined)
      end
    end

    describe '.by_group' do
      it 'raises an exception when the group cannot be found' do
        Groups.reset

        proc { Refresh.by_group('') }.must_raise(ModelNotFound)
      end
    end

    describe '.by_name' do
      it 'raises an exception when the buffer cannot be found' do
        proc { Refresh.by_name('') }.must_raise(ModelNotFound)
      end
    end

  end # Refresh

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.2.12 test/lib/vedeu/support/refresh_test.rb
vedeu-0.2.11 test/lib/vedeu/support/refresh_test.rb