Sha256: 72db772e5e4c21a562f8991b55774540924e5a97f3de06214880e19bb0467fc5

Contents?: true

Size: 496 Bytes

Versions: 26

Compression:

Stored size: 496 Bytes

Contents

require "spec_helper"

describe "DOM Attribute Assignment" do
  let(:doc) { Brief.persona_document  }
  let(:model) { doc.to_model }

  it "should make targeting elements easier" do
    expect(doc.css('#rando code').text).not_to be_empty
  end

  it "should assign attributes to the headings" do
    expect(doc.css('[data-random-attr="value"]').length).to eq(1)
  end

  it "should not include the attribute syntax in the text" do
    expect(doc.css('h2').text).to eq('Random Heading')
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
brief-1.17.14 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.13 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.12 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.11 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.10 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.9 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.8 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.7 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.5 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.4 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.3 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.2 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.1 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.17.0 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.16.2 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.16.1 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.16.0 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.15.5 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.15.4 spec/lib/brief/dom_attribute_assignment_spec.rb
brief-1.15.3 spec/lib/brief/dom_attribute_assignment_spec.rb