We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c4d574 + ac2a7c3 commit 12af441Copy full SHA for 12af441
spec/grape/dsl/helpers_spec.rb
@@ -24,6 +24,12 @@ module BooleanParam
24
end
25
26
27
+ class Base < Grape::API
28
+ helpers BooleanParam
29
+ end
30
+
31
+ class Child < Base; end
32
33
describe Helpers do
34
subject { Class.new(HelpersSpec::Dummy) }
35
let(:proc) do
@@ -74,6 +80,19 @@ def test
74
80
expect(subject.first_mod::Boolean).to eq Virtus::Attribute::Boolean
75
81
76
82
83
84
+ context 'in child classes' do
85
+ it 'is available' do
86
+ klass = Child
87
+ expect do
88
+ klass.instance_eval do
89
+ params do
90
+ use :requires_toggle_prm
91
92
93
+ end.to_not raise_exception
94
95
77
96
78
97
79
98
0 commit comments