Skip to content

Commit ba843d7

Browse files
committed
Fix specs and rubocop
1 parent aa00f26 commit ba843d7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

lib/grape/middleware/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Base
66
include Helpers
77
include Grape::DSL::Headers
88

9-
attr_reader :app, :env, :options, :rack_request
9+
attr_reader :app, :env, :options
1010

1111
# @param [Rack Application] app The standard argument for a Rack middleware.
1212
# @param [Hash] options A hash of options, simply stored for use by subclasses.

lib/grape/middleware/formatter.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Grape
44
module Middleware
55
class Formatter < Base
6-
76
def default_options
87
{
98
default_format: :txt,

spec/grape/middleware/base_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,15 @@ def before
243243

244244
context 'when query params are conflicting' do
245245
it 'raises an ConflictingTypes error' do
246-
expect { get '/?x[y]=1&x[y]z=2' } .to raise_error(Grape::Exceptions::ConflictingTypes)
246+
expect { get '/?x[y]=1&x[y]z=2' }.to raise_error(Grape::Exceptions::ConflictingTypes)
247247
end
248248
end
249249

250250
context 'when query params is over the specified limit' do
251-
let(:query_params) { "foo#{"[a]" * Rack::Utils.param_depth_limit}=bar" }
251+
let(:query_params) { "foo#{'[a]' * Rack::Utils.param_depth_limit}=bar" }
252252

253253
it 'raises an ConflictingTypes error' do
254-
expect { get "/?foo#{"[a]" * Rack::Utils.param_depth_limit}=bar" } .to raise_error(Grape::Exceptions::TooDeepParameters)
254+
expect { get "/?foo#{'[a]' * Rack::Utils.param_depth_limit}=bar" }.to raise_error(Grape::Exceptions::TooDeepParameters)
255255
end
256256
end
257257
end

0 commit comments

Comments
 (0)