Sha256: 2e948606aa153615b1d7c3c3a9e78df12a8440e725831181cb6732e93297750e

Contents?: true

Size: 503 Bytes

Versions: 3

Compression:

Stored size: 503 Bytes

Contents

require 'spec/spec_helper'

describe Upstart::Exporter::Errors do
  context "when included" do
    it "should provide #error method" do
      class Foo
        include Upstart::Exporter::Errors
      end

      expect(Foo.new).to respond_to(:error)
    end
  end

  describe "#error" do
    it "should raise a correct exception" do
      class Foo
        include Upstart::Exporter::Errors
      end

      expect{ Foo.new.error("arrgh") }.to raise_exception(Upstart::Exporter::Error)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
upstart-exporter-2.1.5 spec/lib/upstart-exporter/errors_spec.rb
upstart-exporter-2.1.4 spec/lib/upstart-exporter/errors_spec.rb
upstart-exporter-2.1.3 spec/lib/upstart-exporter/errors_spec.rb