Register subclasses with OmniAuth.strategies#95
Merged
bufferoverflow merged 2 commits intoomniauth:masterfrom Apr 9, 2016
appropriate:register-subclasses
Merged
Register subclasses with OmniAuth.strategies#95bufferoverflow merged 2 commits intoomniauth:masterfrom appropriate:register-subclasses
bufferoverflow merged 2 commits intoomniauth:masterfrom
appropriate:register-subclasses
Conversation
| end | ||
|
|
||
| describe 'subclasses' do | ||
| let(:subclass) { Class.new(described_class) } |
Member
There was a problem hiding this comment.
instead of declaring the subclass in a let can we just initialize it within the it block?
it 'registers subclasses in OmniAuth.strategies' do
subclass = Class.new(described_class) # or described_class.new
expect(OmniAuth.strategies).to include(subclass)
endI find this approach easier to read as it defines everything the test needs within the test itself.
Contributor
Author
There was a problem hiding this comment.
Updated and amended. I also threw described_class into the include check since omniauth-oauth2 is doing that check and it seems reasonable.
Contributor
Author
|
These |
Member
|
@md5 I agree. We should move them back to the |
Contributor
Author
|
@supernova32 Updated in f74d983 to allow failures of |
This was referenced Jun 24, 2016
Closed
jiongye
pushed a commit
to jiongye/omniauth-saml
that referenced
this pull request
Jun 29, 2016
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates
OmniAuth::Strategies::SAMLto register any subclasses as strategies with OmniAuth. This parallels what's done in theomniauth-oauth2gem (cf. here).