Skip to content

Commit

Permalink
Remove leaky dummy class in inside_route_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ericproulx committed Sep 25, 2024
1 parent 4a2b6b5 commit b7c284e
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions spec/grape/dsl/inside_route_spec.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# frozen_string_literal: true

module Grape
module DSL
module InsideRouteSpec
class Dummy
include Grape::DSL::InsideRoute

attr_reader :env, :request, :new_settings

def initialize
@env = {}
@header = {}
@new_settings = { namespace_inheritable: {}, namespace_stackable: {} }
end
describe Grape::Endpoint do
subject { dummy_class.new }

let(:dummy_class) do
Class.new do
include Grape::DSL::InsideRoute

attr_reader :env, :request, :new_settings

def initialize
@env = {}
@header = {}
@new_settings = { namespace_inheritable: {}, namespace_stackable: {} }
end
end
end
end

describe Grape::Endpoint do
subject { Grape::DSL::InsideRouteSpec::Dummy.new }

describe '#version' do
it 'defaults to nil' do
Expand Down

0 comments on commit b7c284e

Please sign in to comment.