Sha256: 3292d626b12e9b275f69155d9bc607bdcd1ed3be77ae7988b933964a0725f6f5

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

require 'spec_helper'

describe WrapIt::TextContainer, type: :wrapped do
  it { expect(wrapper_class.default_tag).to eq 'p' }

  %i(text body).each do |option|
    it "gets text from `#{option}` option" do
      expect(wrapper(option => 'text').body).to eq 'text'
    end

    it "cleanups `#{option}` for options" do
      expect(wrapper(option => 'text').html_attr).to_not include option
    end
  end

  it 'gets text from first String argument' do
    expect(wrapper(:symbol, 'text', 'other').body).to eq 'text'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wrap_it-1.0.2 spec/lib/text_container_spec.rb
wrap_it-1.0.1 spec/lib/text_container_spec.rb
wrap_it-1.0.0 spec/lib/text_container_spec.rb