mirror of
https://github.com/correl/rebar.git
synced 2024-12-24 03:00:16 +00:00
Fix test/rebar_eunit_tests.erl
This commit is contained in:
parent
cf24426c4f
commit
22dec4cbb7
1 changed files with 8 additions and 6 deletions
|
@ -77,18 +77,21 @@ cover_with_suite_test_() ->
|
|||
setup,
|
||||
fun() ->
|
||||
setup_cover_project_with_suite(),
|
||||
rebar("-v eunit suite=mysuite")
|
||||
rebar("-v eunit suites=mysuite")
|
||||
end,
|
||||
fun teardown/1,
|
||||
|
||||
[{"All cover reports are generated",
|
||||
[{"Cover reports are generated for module",
|
||||
assert_files_in("the temporary eunit directory",
|
||||
expected_cover_generated_files())},
|
||||
[".eunit/index.html",
|
||||
".eunit/mysuite.COVER.html"])},
|
||||
|
||||
{"Only production modules get coverage reports",
|
||||
assert_files_not_in("the temporary eunit directory",
|
||||
[".eunit/myapp_mymod_tests.COVER.html",
|
||||
".eunit/mysuite.COVER.html"])}]}.
|
||||
[".eunit/myapp_app.COVER.html",
|
||||
".eunit/myapp_mymod.COVER.html",
|
||||
".eunit/myapp_sup.COVER.html",
|
||||
".eunit/myapp_mymod_tests.COVER.html"])}]}.
|
||||
|
||||
expected_cover_generated_files() ->
|
||||
[".eunit/index.html",
|
||||
|
@ -247,6 +250,5 @@ assert_full_coverage(Mod) ->
|
|||
Result = [X || X <- string:tokens(binary_to_list(F), "\n"),
|
||||
string:str(X, Mod) =/= 0,
|
||||
string:str(X, "100%") =/= 0],
|
||||
ok = file:close(F),
|
||||
?assert(length(Result) =:= 1)
|
||||
end.
|
||||
|
|
Loading…
Reference in a new issue