This repository was archived by the owner on Jan 5, 2022. It is now read-only.
Implement option to add custom fixture file extension#56
Merged
Conversation
hylkealons
reviewed
Sep 16, 2019
| file = location <> fixture <> ".json" | ||
| @spec load!(String.t(), String.t(), String.t()) :: String.t() | ||
| def load!(fixture, location \\ @fixture_location, file_extension \\ ".json") do | ||
| file = location <> fixture <> file_extension |
Contributor
There was a problem hiding this comment.
since load has nothing to do with json, I would prefer moving this to load_json! https://github.com/digitalorigin/pg-elixir-tools/pull/56/files#diff-0dbd60fba723e3e21c6dff1ddf34eeb4R11
Contributor
There was a problem hiding this comment.
since it's directly related, I'd do it here: but up to @fartek
Contributor
Author
There was a problem hiding this comment.
The reason why I would leave the default .json here is because maybe some modules in some projects are depending on this default functionality. This is a suggestion to break the current API, which I don't wanna do (in this PR).
dabeat
approved these changes
Sep 16, 2019
hylkealons
approved these changes
Sep 16, 2019
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
🎩 Problem
No way to load fixtures that are not .json files (such as .tsv files).
📌 Solution
Add option for this.
👻 GIF