Clean up changes from PR #174

This commit is contained in:
Yorick Peterse committed 2017-04-18 12:55:11 +02:00
1 parent 4250033ed5
commit 84c4db3e9f
2 files changed
+17 -13

No files matched your search

+12 -9
View File
@@ -107,22 +107,25 @@ describe Oga::XML::Element do
end
describe 'using an HTML document' do
let!(:attr) do
Oga::XML::Attribute.new(:name => 'foo:bar', :value => 'foo')
let(:attr) do
Oga::XML::Attribute.new(name: 'foo:bar', value: 'foo')
end
let!(:el) do
described_class.new(:name => 'foo', :attributes => [attr])
end
let!(:doc) do
Oga::XML::Document.new(:children => [el], :type => :html)
let(:el) do
el = described_class.new(name: 'foo', attributes: [attr])
Oga::XML::Document.new(children: [el], type: :html)
el
end
it 'returns an attribute with a name containing a namespace separator' do
el.attribute('foo:bar').should == attr
end
it 'returns an attribute with a name containing a namespace separator when using a Symbol' do
el.attribute(:'foo:bar').should == attr
describe 'using a Symbol argument' do
it 'returns the attribute' do
el.attribute(:'foo:bar').should == attr
end
end
end
end