Skip to content

Commit

Permalink
spec/dom/element/attributes: fix specs in IE6..8
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Feb 3, 2014
1 parent 25770ac commit 93aec20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/dom/element/attributes_spec.rb
Expand Up @@ -2,7 +2,7 @@

describe Browser::DOM::Element::Attributes do
html <<-HTML
<div id="lol" class="name" for="hue"></div>
<label id="lol" class="name" for="hue"></div>
HTML

describe '#[]' do
Expand Down Expand Up @@ -41,7 +41,11 @@

describe '#each' do
it 'enumerates over the attributes' do
expect($document[:lol].attributes.to_a.sort).to eq \
attributes = $document[:lol].attributes.select {|name, _|
%w[class for id].include?(name)
}

expect(attributes.sort).to eq \
[[:class, :name], [:for, :hue], [:id, :lol]]
end
end
Expand Down

0 comments on commit 93aec20

Please sign in to comment.