-
-
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
Fix MIME spec examples to not collide with actual registry #8795
Fix MIME spec examples to not collide with actual registry #8795
Conversation
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.
Granted that name will probably never conflict, wouldn't it just be better to reset and reinit with the loaddefaults set to false?
I'm sure there was a reason why I didn't do that in the first place. But I don't recall. It looks you might be right. |
Updated the specs to call |
Might be a good usecase for |
|
@straight-shoota want to work on this or should this be merged without any changes to get the specs suite fixed? |
6019f5c
to
7c29e17
Compare
Rebased on master and changed to use spec hooks. |
before_each do | ||
MIME.reset! | ||
end | ||
|
||
after_each do | ||
MIME.reset! | ||
end |
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.
Why not use around_each
instead?
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.
Does it make a difference? around_each
is for when you need to share state between setup and teardown steps. There's no locally shared state here, so can just use before and after hooks.
Fixes #8793
Prefixing the file extensions should make sure they don't match any existing values in the system's MIME registry.