Sha256: da813f06058ce4c5e0493ab44ac976015b74134db41d780db8a65be9a4d9d31d

Contents?: true

Size: 1.06 KB

Versions: 62

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

describe Kuhsaft::AccordionItemBrick do

  let :accordion_item_brick do
    Kuhsaft::AccordionItemBrick.new
  end

  describe '#valid' do
    before do
      accordion_item_brick.valid?
    end

    context 'without a #caption' do
      it 'has en error' do
        accordion_item_brick.should have(1).error_on(:caption)
      end
    end
  end

  describe '#user_can_delete?' do
    it 'returns true' do
      accordion_item_brick.user_can_delete?.should be_true
    end
  end

  describe '#user_can_save' do
    it 'returns true' do
      accordion_item_brick.user_can_save?.should == true
    end
  end

  describe '#renders_own_childs?' do
    it 'returns false' do
      accordion_item_brick.renders_own_childs?.should be_false
    end
  end

  describe '#bricks' do
    it 'can have childs' do
      accordion_item_brick.should respond_to(:bricks)
    end
  end

  describe '#to_style_class' do
    it 'includes the bootstrap classname' do
      accordion_item_brick.to_style_class.should == 'kuhsaft-accordion-item-brick accordion-group'
    end
  end
end

Version data entries

62 entries across 62 versions & 2 rubygems

Version Path
qbrick-2.5.0.pre spec/models/accordion_item_brick_spec.rb
kuhsaft-2.4.3 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.4.2 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.4.1 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.4.0 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.6 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.5 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.4 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.3 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.2 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.1 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.3.0 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.6 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.5 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.4 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.3 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.2 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.1 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.2.0 spec/models/accordion_item_brick_spec.rb
kuhsaft-2.1.2 spec/models/accordion_item_brick_spec.rb