Sha256: dc3b9ecb6dbbc5c4cffe01c52ce26b63d86d7ad4c378e9b8a2cb93b6298c46b5

Contents?: true

Size: 320 Bytes

Versions: 16

Compression:

Stored size: 320 Bytes

Contents

RSpec::Matchers.define :match_xpath do |xpath, expected_value|
  match do |xml|
    @xml = Nokogiri::XML xml
    @xml.remove_namespaces!
    @xml.xpath(xpath).text.should == expected_value.to_s
  end

  failure_message do |actual|
    "expected xpath '#{xpath}' with value '#{expected_value}' in doc:\n#{@xml}"
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
afipws-2.3.0 spec/support/matchers.rb
afipws-2.2.0 spec/support/matchers.rb
afipws-2.1.0 spec/support/matchers.rb
afipws-2.0.0 spec/support/matchers.rb
afipws-1.3.2 spec/support/matchers.rb
afipws-1.3.1 spec/support/matchers.rb
afipws-1.3.0 spec/support/matchers.rb
afipws-1.2.3 spec/support/matchers.rb
afipws-1.2.2 spec/support/matchers.rb
afipws-1.2.1 spec/support/matchers.rb
afipws-1.2.0 spec/support/matchers.rb
afipws-1.1.0 spec/support/matchers.rb
afipws-1.0.4 spec/support/matchers.rb
afipws-1.0.3 spec/support/matchers.rb
afipws-1.0.2 spec/support/matchers.rb
afipws-1.0.1 spec/support/matchers.rb