Sha256: 48d043e7362986821aaef59312b36f149f23b9d4fbae9b1cd464fc4c56583f7e
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
# rubocop:disable RSpec/FilePath describe Rake::Funnel::Extensions::REXML::Functions do let(:xml) do <<XML <editors xmlns="http://example.com"> <editor id="emacs">EMACS</editor> <editor id="vi">VIM</editor> <editor id="notepad">Notepad</editor> </editors> XML end subject { REXML::Document.new(xml) } it 'should support lower-case function' do expect(REXML::XPath.match(subject, "//editor[lower-case(text())='vim']").first.to_s).to match(/VIM/) end it 'should support matches function' do expect(REXML::XPath.match(subject, "//editor[matches(@id, '*pad')]").first.to_s).to match(/Notepad/) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rake-funnel-0.21.2 | spec/rake/funnel/extensions/rexml_spec.rb |
rake-funnel-0.21.1 | spec/rake/funnel/extensions/rexml_spec.rb |