Sha256: 9d4f55bbf70e442115ea97969654061b83b4de2a22ffead3ab8a0fc692a9cc01

Contents?: true

Size: 952 Bytes

Versions: 4

Compression:

Stored size: 952 Bytes

Contents

require 'test_helper'

module Vedeu

  module Clear

    describe Group do

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

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

      describe '.render' do
        let(:group) { Vedeu::Models::Group.new(members: [_name]) }

        before { Vedeu.groups.stubs(:by_name).returns(group) }

        subject { described.render(_name) }

        it {
          Vedeu::Clear::Interface.expects(:render).with(_name)
          subject
        }

        it { described.must_respond_to(:by_group) }
        it { described.must_respond_to(:clear_by_group) }
      end

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

    end # Group

  end # Clear

end # Vedeu

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.6.19 test/lib/vedeu/output/clear/group_test.rb
vedeu-0.6.18 test/lib/vedeu/output/clear/group_test.rb
vedeu-0.6.17 test/lib/vedeu/output/clear/group_test.rb
vedeu-0.6.16 test/lib/vedeu/output/clear/group_test.rb