Sha256: 67a04611c8008f820c265eea303ad3da94f0fcff653f1bc7c5bf366069a1c9c6

Contents?: true

Size: 474 Bytes

Versions: 79

Compression:

Stored size: 474 Bytes

Contents

require 'test_helper'

describe Crack::XML do
  it "default to REXMLParser" do
    Crack::XML.parser.must_equal Crack::REXMLParser
  end

  describe "with a custom Parser" do
    class CustomParser
      def self.parse(xml)
        xml
      end
    end

    before do
      Crack::XML.parser = CustomParser
    end

    it "use the custom Parser" do
      Crack::XML.parse("<xml/>").must_equal "<xml/>"
    end

    after do
      Crack::XML.parser = nil
    end
  end
end

Version data entries

79 entries across 71 versions & 13 rubygems

Version Path
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/test/parser_test.rb