-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #801: removes deprecation messages, uses a new version of RSpec with Rails 5. Thank you @nbulaj for working on this.
- Loading branch information
Showing
9 changed files
with
47 additions
and
18 deletions.
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
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 |
---|---|---|
|
@@ -12,6 +12,6 @@ def sign_in | |
end | ||
|
||
def callback | ||
render text: 'ok' | ||
render plain: 'ok' | ||
end | ||
end |
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,24 @@ | ||
# Rails 5 deprecates calling HTTP action methods with positional arguments | ||
# in favor of keyword arguments. However, the keyword argument form is only | ||
# supported in Rails 5+. Since we support back to 4, we need some sort of shim | ||
# to avoid super noisy deprecations when running tests. | ||
module HTTPMethodShim | ||
def get(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def post(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
|
||
def put(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
end | ||
|
||
if ::Rails::VERSION::MAJOR >= 5 | ||
RSpec.configure do |config| | ||
config.include HTTPMethodShim, type: :controller | ||
config.include HTTPMethodShim, type: :request | ||
end | ||
end |