Sha256: f949d9d0327cc3c668d591c5eb2bf8faf8f0b08e1f443b4306fe4864659fecfd

Contents?: true

Size: 395 Bytes

Versions: 14

Compression:

Stored size: 395 Bytes

Contents

require 'spec_helper'

describe Gris::ErrorHelpers do
  before do
    @helper = SpecApiErrorHelper.new
  end

  context 'gris_error!' do
    it 'returns a correctly formatted error message' do
      @helper.gris_error! 'error', 400
      expect(@helper.message)
        .to eq(message: { message: 'error', status: 400 }, status: 400)
      expect(@helper.thrown).to eq(:error)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gris-0.6.8 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.7 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.6 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.5 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.2 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.1 spec/grape_extensions/error_helpers_spec.rb
gris-0.6.0 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.9 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.8 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.7 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.6 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.5 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.4 spec/grape_extensions/error_helpers_spec.rb
gris-0.5.3 spec/grape_extensions/error_helpers_spec.rb