New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the use of matchers from multiple libs, for non rails projects. #714
Allow the use of matchers from multiple libs, for non rails projects. #714
Conversation
|
||
subject { run_rspec_suite } | ||
|
||
context 'in a project that uses both active_record and active_model libraries' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
Ah. Yes -- this totally makes sense and I don't know why I overlooked this when I was adding this. |
3bc9087
to
ffff82a
Compare
expect(subject).to have_output('2 examples, 0 failures') | ||
expect(subject).to have_output('should require name to be set') | ||
expect(subject).to have_output( | ||
'should require case sensitive unique value for name' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent the first parameter one step more than the previous line.
ffff82a
to
3d99399
Compare
@mcmire great, I just fixed the 🐶's review. |
@@ -58,8 +59,8 @@ def no_test_frameworks_added? | |||
@test_frameworks.empty? || !@test_frameworks.any?(&:present?) | |||
end | |||
|
|||
def library_not_set? | |||
@library.nil? | |||
def libraries_empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about no_libraries_set
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, it makes sense like no_test_frameworks_added?
. I will rename it.
* It changes shoulda-matchers to allow the integration with multiple libraries like active_model and active_record. For example, in a non Rails project isn't possible to use both validate_presence_of and validate_uniqueness_of matchers, because they are from different libraries (one from active_model and the other from active_record respectively). This change allow the integration with multiple libraries. fixes thoughtbot#710
3d99399
to
29e8eae
Compare
Thanks! This was merged as 721900b. |
@mcmire 👍 😸 |
It changes shoulda-matchers to allow the integration with multiple
libraries like active_model and active_record.
For example, in a non Rails project isn't possible to use both
validate_presence_of and validate_uniqueness_of matchers, because they
are from different libraries (one from active_model and the another from
active_record respectively).
This change allow the integration with multiple libraries.
fixes Undefined method validate_uniqueness_of error on sinatra app #710