Sha256: 0a722c8a13be445eeb46a831f24165656967017de1ff2ff91f043094b41b92f9
Contents?: true
Size: 937 Bytes
Versions: 6
Compression:
Stored size: 937 Bytes
Contents
require 'spec_helper' describe Kuhsaft::LinkBrick do let :link_brick do Kuhsaft::LinkBrick.new end describe '#valid' do before do link_brick.valid? end context 'without a #href' do it 'has en error' do link_brick.should have(1).error_on(:href) end end context 'without a #caption' do it 'has an error' do link_brick.should have(1).error_on(:caption) end end end describe '#bricks' do it 'can not have childs' do link_brick.should_not respond_to(:bricks) end end describe '.styles' do it 'returns the available link styles' do Kuhsaft::LinkBrick.styles.should == %w(pdf word excel button external) end end describe '#to_style_class' do it 'includes the link style' do link_brick.stub(:link_style).and_return('pdf') link_brick.to_style_class.should == 'kuhsaft-link-brick pdf' end end end
Version data entries
6 entries across 6 versions & 1 rubygems