File: regression_spec.rb

package info (click to toggle)
ruby-roxml 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 800 kB
  • sloc: ruby: 4,133; xml: 1,013; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'spec_helper'

describe ROXML do
  describe 'frozen nils' do
    subject { nil }

    # Prior to ruby-2.2, nil was not frozen. This test watches for
    # a regression in previous versions of roxml that caused nil to
    # become frozen.  FIXME: remove after ruby-2.1 support is removed.
    if RUBY_VERSION < "2.2"
      context 'before unmarshalling an XML document' do
        it { is_expected.to_not be_frozen }
      end

      context 'after unmarshalling an XML document' do
        before do
          lib = Library.from_xml(fixture(:library))
        end

        it { is_expected.to_not be_frozen }
      end
    end
  end
end