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
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
crack-without-safe_yaml-0.4.3 test/parser_test.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/crack-0.4.2/test/parser_test.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/crack-0.4.2/test/parser_test.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/crack-0.4.2/test/parser_test.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/test/parser_test.rb
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/crack-0.4.3/test/parser_test.rb
crack-0.4.3 test/parser_test.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/crack-0.4.2/test/parser_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/crack-0.4.2/test/parser_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/crack-0.4.2/test/parser_test.rb
whos_dated_who-0.1.0 vendor/bundle/gems/crack-0.4.2/test/parser_test.rb
whos_dated_who-0.0.1 vendor/bundle/gems/crack-0.4.2/test/parser_test.rb
crack-0.4.2 test/parser_test.rb
crack-0.4.1 test/parser_test.rb
crack-0.4.0 test/parser_test.rb