spec/grape/request_spec.rb in grape-1.7.1 vs spec/grape/request_spec.rb in grape-1.8.0

- old
+ new

@@ -60,32 +60,22 @@ expect(request.params).to eq(ActiveSupport::HashWithIndifferentAccess.new(a: '123', b: 'xyz', c: 'ccc')) end end end - describe 'when the param_builder is set to Hashie' do + describe 'when the build_params_with is set to Hashie' do subject(:request_params) { described_class.new(env, **opts).params } - before do - Grape.configure do |config| - config.param_builder = Grape::Extensions::Hashie::Mash::ParamBuilder - end - end - - after do - Grape.config.reset - end - context 'when the API does not include a specific param builder' do let(:opts) { {} } - it { is_expected.to be_a(Hashie::Mash) } + it { is_expected.to be_a(Hash) } end context 'when the API includes a specific param builder' do - let(:opts) { { build_params_with: Grape::Extensions::Hash::ParamBuilder } } + let(:opts) { { build_params_with: Grape::Extensions::Hashie::Mash::ParamBuilder } } - it { is_expected.to be_a(Hash) } + it { is_expected.to be_a(Hashie::Mash) } end end describe '#headers' do let(:options) do