diff --git a/spec/oga/xpath/evaluator/general_spec.rb b/spec/oga/xpath/evaluator/general_spec.rb index b73f2d0..801432a 100644 --- a/spec/oga/xpath/evaluator/general_spec.rb +++ b/spec/oga/xpath/evaluator/general_spec.rb @@ -26,10 +26,10 @@ describe Oga::XPath::Evaluator do context '#node_matches?' do before do - ns = Oga::XML::Namespace.new(:name => 'x') - @name_node = Oga::XML::Element.new(:name => 'a') - @name_ns_node = Oga::XML::Element.new(:name => 'b', :namespace => ns) + @name_ns_node = Oga::XML::Element.new(:name => 'b', :namespace_name => 'x') + + @name_ns_node.register_namespace('x', 'y') end example 'return true if a node is matched by its name' do diff --git a/spec/oga/xpath/evaluator/paths_spec.rb b/spec/oga/xpath/evaluator/paths_spec.rb index 1f5f92f..d239c3c 100644 --- a/spec/oga/xpath/evaluator/paths_spec.rb +++ b/spec/oga/xpath/evaluator/paths_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Oga::XPath::Evaluator do before do - @document = parse('Foo') + @document = parse('Foo') end context 'absolute paths' do diff --git a/spec/oga/xpath/evaluator/wildcard_spec.rb b/spec/oga/xpath/evaluator/wildcard_spec.rb index c096156..c468f67 100644 --- a/spec/oga/xpath/evaluator/wildcard_spec.rb +++ b/spec/oga/xpath/evaluator/wildcard_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Oga::XPath::Evaluator do before do - @document = parse('') + @document = parse('') @evaluator = described_class.new(@document) end