Sha256: d8f6e80f368f8287eca379bdf40bd1d289c0470432020c1df64e197299b166e7

Contents?: true

Size: 623 Bytes

Versions: 11

Compression:

Stored size: 623 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

11 entries across 11 versions & 1 rubygems

Version Path
rake-funnel-0.3.2.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.3.1.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.3.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.2.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.1.0.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.6.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.5.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.4.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.3.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.2.pre spec/rake/funnel/extensions/rexml_spec.rb
rake-funnel-0.0.1.pre spec/rake/funnel/extensions/rexml_spec.rb