eksperimental
unread,Sep 9, 2015, 1:20:02 AM9/9/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to elixir-l...@googlegroups.com
While doing various fixes in Elixir, I have come across two issues at
once,
(attached is a copy of the terminal output for easier reading)
1) test prints elixir req mismatches (Mix.Tasks.DepsTest)
test/mix/tasks/deps_test.exs:75
No message matching {:mix_shell, :error, [^msg]} after 0ms.
Process mailbox: {:mix_shell, :info, ["==> ok"]}
{:mix_shell, :error, ["warning: the dependency 'ok' requires
Elixir \"~> 0.1.0\" but you are running on v1.1.0-beta"]}
{:mix_shell, :info, ["Generated ok app"]} stacktrace:
test/mix/tasks/deps_test.exs:93: anonymous fn/0 in
Mix.Tasks.DepsTest.test prints elixir req mismatches/1 (elixir)
lib/file.ex:1131: File.cd!/2 test/test_helper.exs:102:
MixTest.Case.in_fixture/3 test/mix/tasks/deps_test.exs:78
the code in the test setting this up:
msg = "warning: the dependency 'ok' requires Elixir \"~> 0.1.0\"
" <> "but you are running on v#{System.version}"
assert_received {:mix_shell, :error, [^msg]}
What I'm missing the Expected value, which made me impossible to
realize, without going back to the source code, to see what was wrong
with it.
*******
The second issue is,
```
2) test cleans dependencies (Mix.Tasks.DepsTest)
test/mix/tasks/deps_test.exs:570
Wrong message for Mix.Error. Expected "mix deps.clean expects
dependencies as arguments or a flag indicating which dependencies
to clean. The --all option will clean all dependencies while the
--unused option cleans unused dependencies", got "`mix deps.clean`
expects dependencies as arguments or a flag indicating which
dependencies to clean. The '--all' option will clean all
dependencies while the '--unused' option cleans unused
dependencies"
```
Wouldn't it be much clearer to have something broken into new lines
such as,
Wrong message for Mix.Error.
Expected:
"mix deps.clean expects dependencies as arguments or a flag
indicating which dependencies to clean. The --all option will
clean all dependencies while the --unused option cleans unused
dependencies"
Got:
"`mix deps.clean` expects dependencies as
arguments or a flag indicating which dependencies to clean. The
'--all' option will clean all dependencies while the '--unused'
option cleans unused dependencies"
thanks for reading