Sha256: fd6bdd16fdff761c318326d511e48e33030434a8574c4884253390534db765b6

Contents?: true

Size: 661 Bytes

Versions: 2

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Grape::Exceptions::UnsupportedGroupType do
  subject { described_class.new }

  describe '#message' do
    subject { described_class.new.message }

    it { is_expected.to include 'group type must be Array, Hash, JSON or Array[JSON]' }
  end

  describe 'deprecated Grape::Exceptions::UnsupportedGroupTypeError' do
    subject { Grape::Exceptions::UnsupportedGroupTypeError.new }

    it 'puts a deprecation warning' do
      expect(Warning).to receive(:warn) do |message|
        expect(message).to include('`Grape::Exceptions::UnsupportedGroupTypeError` is deprecated')
      end

      subject
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grape-1.7.1 spec/grape/exceptions/unsupported_group_type_spec.rb
grape-1.7.0 spec/grape/exceptions/unsupported_group_type_spec.rb