Sha256: d1f46a5bfae316169f2d48fc12c8d632c869227eb849b10e49fd2e69507706a2

Contents?: true

Size: 637 Bytes

Versions: 17

Compression:

Stored size: 637 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper.rb')

describe 'Dumpable' do
  context 'for classes forgetting to implement #dump' do
    let(:type) do
      Class.new do
        include Attributor::Dumpable
      end
    end

    it 'gets an exception' do
      expect { type.new.dump }.to raise_exception(NotImplementedError)
    end
  end

  context 'for classes properly implementing #dump' do
    let(:type) do
      Class.new do
        include Attributor::Dumpable
        def dump
        end
      end
    end

    it 'do not get the base exception' do
      expect { type.new.dump }.to_not raise_error
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
attributor-8.0 spec/dumpable_spec.rb
attributor-7.1 spec/dumpable_spec.rb
attributor-7.0 spec/dumpable_spec.rb
attributor-6.5 spec/dumpable_spec.rb
attributor-6.4 spec/dumpable_spec.rb
attributor-6.3 spec/dumpable_spec.rb
attributor-6.2 spec/dumpable_spec.rb
attributor-6.1 spec/dumpable_spec.rb
attributor-6.0 spec/dumpable_spec.rb
attributor-5.7 spec/dumpable_spec.rb
attributor-5.6 spec/dumpable_spec.rb
attributor-5.5 spec/dumpable_spec.rb
attributor-5.4 spec/dumpable_spec.rb
attributor-5.3 spec/dumpable_spec.rb
attributor-5.2.1 spec/dumpable_spec.rb
attributor-5.2.0 spec/dumpable_spec.rb
attributor-5.1.0 spec/dumpable_spec.rb