Sha256: 350084cfe0b53a61b37b8c345962879d809f4ee9896895decf5b0802d6d49bd9

Contents?: true

Size: 1.02 KB

Versions: 41

Compression:

Stored size: 1.02 KB

Contents

require 'test_helper'

module Vedeu

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

  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

41 entries across 41 versions & 1 rubygems

Version Path
vedeu-0.6.50 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.49 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.48 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.47 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.46 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.45 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.44 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.43 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.42 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.41 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.40 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.39 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.38 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.37 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.36 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.35 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.34 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.33 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.32 test/lib/vedeu/groups/clear_test.rb
vedeu-0.6.31 test/lib/vedeu/groups/clear_test.rb