-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add be_format test matcher #1758
Add be_format test matcher #1758
Conversation
@yanivpr does the value of |
@thomasfedb To clarify - you mean that I should cover all cases? |
@yanivpr is a regex the most efficient way to handle that? |
Also @yanivpr, it might be worthwhile ensuring that your matcher gets used within the carrierwave test suite. |
|
img = ::MiniMagick::Image.open(@instance.current_path) | ||
expect(img['format']).to match(/PNG/) | ||
expect(@instance.file.extension).to eq('png') | ||
expect(@instance).to be_format('PNG') |
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.
Can you change 'PNG'
to 'png'
.
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.
👍
* Test format case insensitive. * Use format test matcher in the test suite. * Add format test matcher to readme file.
fabec96
to
a14b6ec
Compare
Thank you for the code review! |
Lovely. Cheers @yanivpr. |
Add a test matcher for the
format
.Could be useful to test that a conversion has happened.
Usage: