Sha256: 2166efdaac320edf78c27d97a233e15908a4cbce29e44567375435a3628a9033

Contents?: true

Size: 871 Bytes

Versions: 5

Compression:

Stored size: 871 Bytes

Contents

require 'test_helper'

module Vedeu

  describe RefreshGroup do

    let(:described) { Vedeu::RefreshGroup }
    let(:instance)  { described.new(_name) }
    let(:_name)     { 'Vedeu::RefreshGroup' }

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

    describe '.by_name' do
      subject { described.by_name(_name) }

      context 'when the name is not present' do
        let(:_name) { '' }

        it { proc { subject }.must_raise(Vedeu::MissingRequired) }
      end

      context 'when the name is present' do
        it {
          Vedeu::RefreshGroup.expects(:by_name).with(_name)
          subject
        }
      end
    end

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

  end # RefreshGroup

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.6.1 test/lib/vedeu/refresh/refresh_group_test.rb
vedeu-0.6.0 test/lib/vedeu/refresh/refresh_group_test.rb
vedeu-0.5.13 test/lib/vedeu/refresh/refresh_group_test.rb
vedeu-0.5.12 test/lib/vedeu/refresh/refresh_group_test.rb
vedeu-0.5.11 test/lib/vedeu/refresh/refresh_group_test.rb