Skip to content
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

Raise missing asset error in more places #16

Merged
merged 1 commit into from
Oct 26, 2021
Merged

Conversation

brenogazzola
Copy link
Collaborator

Add missing asset error to the resolvers.

@dhh dhh merged commit 0fd7814 into main Oct 26, 2021
@dhh dhh deleted the missing-asset-error-2 branch October 26, 2021 11:00
assert_nil @resolver.resolve("nowhere.txt")
test "resolving missing asset raises a custom error" do
assert_raise Propshaft::MissingAssetError do
assert_nil @resolver.resolve("nowhere.txt")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assert_nil here is misleading and unnecessary after the method was changed to raise an exception:

Suggested change
assert_nil @resolver.resolve("nowhere.txt")
@resolver.resolve("nowhere.txt")

However, rather than making that change, I've proposed a small refactor in #20: feec9cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants