Sha256: dea6544e48896d138aae989ec463761c507574fc91c682899af9e4736163f10e

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 Bytes

Contents

RSpec.describe Machinist, 'exceptions' do
  describe Machinist::BlueprintCantSaveError do
    it 'presents the right message' do
      blueprint = Machinist::Blueprint.new(String) {}
      exception = Machinist::BlueprintCantSaveError.new(blueprint)
      expect(exception.message).to eq('make! is not supported by blueprints for class String')
    end
  end

  describe Machinist::NoBlueprintError do
    it 'presents the right message' do
      exception = Machinist::NoBlueprintError.new(String, :master)
      expect(exception.message).to eq('No master blueprint defined for class String')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
machinist_redux-3.0.4 spec/machinist/exceptions_spec.rb
machinist_redux-3.0.3 spec/machinist/exceptions_spec.rb
machinist_redux-3.0.2 spec/machinist/exceptions_spec.rb
machinist_redux-3.0.0 spec/machinist/exceptions_spec.rb