Sha256: ed3980e3c33f61f011bf8c282477803d19fb862c206f564affc3d14fbc18e8e1

Contents?: true

Size: 682 Bytes

Versions: 33

Compression:

Stored size: 682 Bytes

Contents

require 'spec_helper'

describe Kuhsaft::TextBrick do
  let :text_brick do
    Kuhsaft::TextBrick.new
  end

  describe '#bricks' do
    it 'can not have childs' do
      text_brick.should_not respond_to(:bricks)
    end
  end

  describe '#user_can_add_childs?' do
    it 'returns false' do
      text_brick.user_can_add_childs?.should be_false
    end
  end

  describe '#collect_fulltext' do
    before do
      text_brick.text = '<div><b>foo</b> <b>bar</b></div>'
      text_brick.read_more_text = '<div><span>foo</span><span>bar</span></div>'
    end

    it 'sanitizes text and read_more_text' do
      text_brick.collect_fulltext.should == 'foo bar foobar'
    end
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

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