Sha256: 0b404b0ce4fe276c2fc341afd0cb63e93a2d0c9246d3f4406059ee6f29ba6be0

Contents?: true

Size: 954 Bytes

Versions: 10

Compression:

Stored size: 954 Bytes

Contents

require 'test_helper'

module Vedeu

  module Groups

    describe Clear do

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

      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::Groups::Group.new(members: [_name]) }

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

        subject { described.render(_name) }

        it {
          Vedeu.expects(:trigger).with(:_clear_view_, _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 # Clear

  end # Groups

end # Vedeu

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vedeu-0.6.29 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.28 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.27 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.26 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.25 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.24 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.23 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.22 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.21 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.20 test/lib/vedeu/groups/clear_test.rb