Sha256: d904f7ffee42a31d672f14f1ea5020bd0b98e8da322c6d23710cba31ccd1a8f6
Contents?: true
Size: 660 Bytes
Versions: 3
Compression:
Stored size: 660 Bytes
Contents
require 'spec_helper' describe WrapIt::Link, type: :wrapped do it 'has `a` tag by default' do expect(successor.tag).to eq 'a' end it { expect(successor).to be_kind_of WrapIt::TextContainer } it 'takes href from options' do [:link, :href, :url].each do |key| @successor = nil expect(successor(key => 'url').href).to eq 'url' end end it 'takes href from first string arg if block present' do expect(successor('url') { 'text' }.href).to eq 'url' end it 'takes href from second string arg if no block given' do expect(successor('text', 'url').href).to eq 'url' expect(successor.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/link_spec.rb |
wrap_it-1.0.1 | spec/lib/link_spec.rb |
wrap_it-1.0.0 | spec/lib/link_spec.rb |