Sha256: 926bfb81720c37679b7f0825022cc505e241067c11dd78f46ea47a8be1c8d7d1

Contents?: true

Size: 648 Bytes

Versions: 2

Compression:

Stored size: 648 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Machinist, "exceptions" do

  describe Machinist::BlueprintCantSaveError do
    it "presents the right message" do
      blueprint = Machinist::Blueprint.new(String) { }
      exception = Machinist::BlueprintCantSaveError.new(blueprint)
      exception.message.should == "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)
      exception.message.should == "No master blueprint defined for class String"
    end
  end

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
machinist-2.0 spec/exceptions_spec.rb
indirect-machinist-2.0.0.beta3 spec/exceptions_spec.rb