forked from ruby-grape/grape
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix eager loading due to ServeStream rename
ServeFile was renamed to ServeStream in ruby-grape#1520. Calling Grape.eager_load! would fail with: ``` uninitialized constant Grape::ServeFile (NameError) ```
- Loading branch information
Showing
4 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib')) | ||
require 'grape' | ||
require 'grape/eager_load' | ||
|
||
describe 'eager loading' do | ||
class API < Grape::API | ||
end | ||
|
||
it 'loads successfully' do | ||
expect { Grape.eager_load! }.to_not raise_error | ||
expect { API.compile! }.to_not raise_error | ||
end | ||
end |