Sha256: dd9d00b99c9cc6c5e150342b17cd61fa7b315137910a12dbf22b8b7eb40d38d3

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

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

describe 'Dumpable' do

  context 'for classes forgetting to implement #dump' do
    let(:type) {
      Class.new do
        include Attributor::Dumpable
      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) {
      Class.new do
        include Attributor::Dumpable
        def dump
        end
      end
     }

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
attributor-5.0.2 spec/dumpable_spec.rb