File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -785,29 +785,13 @@ def memoized
785
785
return 'Hello'
786
786
end
787
787
788
+ expect ( Grape . deprecator ) . to receive ( :warn ) . with ( 'Using `return` in an endpoint has been deprecated.' )
789
+
788
790
get '/home'
789
791
expect ( last_response . status ) . to eq ( 200 )
790
792
expect ( last_response . body ) . to eq ( 'Hello' )
791
793
end
792
794
793
- describe '.generate_api_method' do
794
- it 'raises NameError if the method name is already in use' do
795
- expect do
796
- described_class . generate_api_method ( 'version' , &proc { } )
797
- end . to raise_error ( NameError )
798
- end
799
-
800
- it 'raises ArgumentError if a block is not given' do
801
- expect do
802
- described_class . generate_api_method ( 'GET without a block method' )
803
- end . to raise_error ( ArgumentError )
804
- end
805
-
806
- it 'returns a Proc' do
807
- expect ( described_class . generate_api_method ( 'GET test for a proc' , &proc { } ) ) . to be_a Proc
808
- end
809
- end
810
-
811
795
context 'filters' do
812
796
describe 'before filters' do
813
797
it 'runs the before filter if set' do
You can’t perform that action at this time.
0 commit comments