Sha256: 4c973a86dccb75a32a1373d52a3955c2091e170e003a1ef4fe4b1a905949437e

Contents?: true

Size: 799 Bytes

Versions: 388

Compression:

Stored size: 799 Bytes

Contents

require "helper"

module Nokogiri
  module XML
    class Node
      class TestSaveOptions < Nokogiri::TestCase
        SaveOptions.constants.each do |constant|
          class_eval <<-EOEVAL
            def test_predicate_#{constant.downcase}
              options = SaveOptions.new(SaveOptions::#{constant})
              assert options.#{constant.downcase}?

              assert SaveOptions.new.#{constant.downcase}.#{constant.downcase}?
            end
          EOEVAL
        end

        def test_default_xml_save_options
          if Nokogiri.jruby?
            assert_equal 0, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT)
          else
            assert_equal SaveOptions::FORMAT, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT)
          end
        end
      end
    end
  end
end

Version data entries

388 entries across 378 versions & 34 rubygems

Version Path
horseman-0.0.3 vendor/ruby/1.9.1/gems/nokogiri-1.5.0/test/xml/node/test_save_options.rb
horseman-0.0.2 vendor/ruby/1.9.1/gems/nokogiri-1.5.0/test/xml/node/test_save_options.rb
nokogiri-maven-1.5.0-java test/xml/node/test_save_options.rb
nokogiri-maglev--1.5.0.1 test/xml/node/test_save_options.rb
nokogiri-1.5.0-java test/xml/node/test_save_options.rb
nokogiri-1.5.0-x86-mingw32 test/xml/node/test_save_options.rb
nokogiri-1.5.0-x86-mswin32-60 test/xml/node/test_save_options.rb
nokogiri-1.5.0 test/xml/node/test_save_options.rb