Sha256: d93efd0ae07178ae1c5e40e2f41cc8af841558a99aa41aca0686de9d4c45da05

Contents?: true

Size: 607 Bytes

Versions: 119

Compression:

Stored size: 607 Bytes

Contents

require "helper"

module Nokogiri
  class TestSlop < Nokogiri::TestCase
    def test_description_tag
      doc = Nokogiri.Slop(<<-eoxml)
        <item>
          <title>foo</title>
          <description>this is the foo thing</description>
        </item>
      eoxml
      assert doc.item.respond_to?(:title)
      assert_equal 'foo', doc.item.title.text
      assert doc.item.respond_to?(:_description), 'should have description'
      assert 'this is the foo thing', doc.item._description.text
      assert !doc.item.respond_to?(:foo)
      assert_raise(NoMethodError) { doc.item.foo }
    end
  end
end

Version data entries

119 entries across 115 versions & 13 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/nokogiri-1.7.1/test/decorators/test_slop.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/nokogiri-1.7.1/test/decorators/test_slop.rb
nokogiri-1.7.2 test/decorators/test_slop.rb
nokogiri-1.7.2-x86-mingw32 test/decorators/test_slop.rb
nokogiri-1.7.2-x64-mingw32 test/decorators/test_slop.rb
nokogiri-1.7.2-java test/decorators/test_slop.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/nokogiri-1.7.1/test/decorators/test_slop.rb
tdiary-5.0.4 vendor/bundle/gems/nokogiri-1.7.1/test/decorators/test_slop.rb
nokogiri-1.7.1 test/decorators/test_slop.rb
nokogiri-1.7.1-x86-mingw32 test/decorators/test_slop.rb
nokogiri-1.7.1-x64-mingw32 test/decorators/test_slop.rb
nokogiri-1.7.1-java test/decorators/test_slop.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.0.1/test/decorators/test_slop.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/nokogiri-1.6.8.1/test/decorators/test_slop.rb