Clean up changes from PR #174
This commit is contained in:
2 files changed
+17
-13
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user