Sha256: 38cca45bf77b15b1278cef5a48cc28cc2b77930782b006655c5d69d7643655d7

Contents?: true

Size: 603 Bytes

Versions: 18

Compression:

Stored size: 603 Bytes

Contents

describe Rake::Funnel::Extensions::REXML::Functions do
  let(:xml) { <<EOF
  <editors xmlns="http://example.com">
    <editor id="emacs">EMACS</editor>
    <editor id="vi">VIM</editor>
    <editor id="notepad">Notepad</editor>
  </editors>
EOF
  }

  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

18 entries across 18 versions & 1 rubygems

Version Path
rake-funnel-0.18.0 spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.17.0 spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.16.1 spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.16.0 spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.15.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.14.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.13.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.12.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.11.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.10.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.9.1.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.9.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.8.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.7.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.6.1.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.6.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.5.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.4.0.pre spec/rake/funnel/extensions/rexml_spec.rb