Sha256: 4c35b7fca881d3456fcd63c87e4e8ef7c0f9f3df7039765aab36d18b50479b0c

Contents?: true

Size: 604 Bytes

Versions: 5

Compression:

Stored size: 604 Bytes

Contents

require "spec_helper"

class BaseDummy
  include Xmlenc::Builder::Base

  tag "tag"
end

describe BaseDummy do
  describe "parse override" do
    it "sets the from_xml flag" do
      expect(BaseDummy.parse("<tag></tag>", :single => true).from_xml?).to be_truthy
    end

    it "raises an error if the message cannot be parsed" do
      expect {
        BaseDummy.parse("invalid")
      }.to raise_error(Xmlenc::UnparseableMessage)
    end

    it "raises an error if the message is nil" do
      expect {
        BaseDummy.parse(nil)
      }.to raise_error(Xmlenc::UnparseableMessage)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xmlenc-0.7.1 spec/lib/xmlenc/builder/base_spec.rb
xmlenc-0.7.0 spec/lib/xmlenc/builder/base_spec.rb
xmlenc-0.6.9 spec/lib/xmlenc/builder/base_spec.rb
xmlenc-0.6.8 spec/lib/xmlenc/builder/base_spec.rb
xmlenc-0.6.6 spec/lib/xmlenc/builder/base_spec.rb