@@ -12,12 +12,12 @@ defmodule Mix.Tasks.NewTest do
1212 assert file =~ "version: \" 0.0.1\" "
1313 end
1414
15- assert_file "hello_world/README.md" , ~r/ # HelloWorld/
15+ assert_file "hello_world/README.md" , ~r/ HelloWorld\n ========== \n \n /
1616 assert_file "hello_world/.gitignore"
1717
1818 assert_file "hello_world/lib/hello_world.ex" , ~r/ defmodule HelloWorld do/
1919
20- assert_file "hello_world/test/test_helper.exs" , ~r/ HelloWorld .start/
20+ assert_file "hello_world/test/test_helper.exs" , ~r/ ExUnit .start() /
2121 assert_file "hello_world/test/hello_world_test.exs" , ~r/ defmodule HelloWorldTest do/
2222
2323 assert_received { :mix_shell , :info , [ "* creating mix.exs" ] }
@@ -35,7 +35,7 @@ defmodule Mix.Tasks.NewTest do
3535 assert file =~ "mod: {HelloWorld, []}"
3636 end
3737
38- assert_file "hello_world/README.md" , ~r/ # HelloWorld/
38+ assert_file "hello_world/README.md" , ~r/ HelloWorld\n ========== \n \n /
3939 assert_file "hello_world/.gitignore"
4040
4141 assert_file "hello_world/lib/hello_world.ex" , fn ( file ) ->
@@ -44,7 +44,7 @@ defmodule Mix.Tasks.NewTest do
4444 assert file =~ "Supervisor.start_link(children, opts)"
4545 end
4646
47- assert_file "hello_world/test/test_helper.exs" , ~r/ HelloWorld .start/
47+ assert_file "hello_world/test/test_helper.exs" , ~r/ ExUnit .start() /
4848 assert_file "hello_world/test/hello_world_test.exs" , ~r/ defmodule HelloWorldTest do/
4949
5050 assert_received { :mix_shell , :info , [ "* creating mix.exs" ] }
@@ -61,12 +61,12 @@ defmodule Mix.Tasks.NewTest do
6161 assert file =~ "version: \" 0.0.1\" "
6262 end
6363
64- assert_file "HELLO_WORLD/README.md" , ~r/ # HelloWorld/
64+ assert_file "HELLO_WORLD/README.md" , ~r/ HelloWorld\n ========== \n \n /
6565 assert_file "HELLO_WORLD/.gitignore"
6666
6767 assert_file "HELLO_WORLD/lib/hello_world.ex" , ~r/ defmodule HelloWorld do/
6868
69- assert_file "HELLO_WORLD/test/test_helper.exs" , ~r/ HelloWorld .start/
69+ assert_file "HELLO_WORLD/test/test_helper.exs" , ~r/ ExUnit .start() /
7070 assert_file "HELLO_WORLD/test/hello_world_test.exs" , ~r/ defmodule HelloWorldTest do/
7171
7272 assert_received { :mix_shell , :info , [ "* creating mix.exs" ] }
@@ -82,7 +82,7 @@ defmodule Mix.Tasks.NewTest do
8282 assert file =~ "apps_path: \" apps\" "
8383 end
8484
85- assert_file "hello_world/README.md" , ~r/ # HelloWorld/
85+ assert_file "hello_world/README.md" , ~r/ HelloWorld\n ========== \n \n /
8686 assert_file "hello_world/.gitignore"
8787
8888 assert_received { :mix_shell , :info , [ "* creating mix.exs" ] }
@@ -142,7 +142,7 @@ defmodule Mix.Tasks.NewTest do
142142 defp assert_file ( file , match ) do
143143 cond do
144144 Regex . regex? ( match ) ->
145- assert_file file , & ( & 1 =~ match )
145+ assert_file file , & ( assert & 1 =~ match )
146146 is_function ( match , 1 ) ->
147147 assert_file ( file )
148148 match . ( File . read! ( file ) )
0 commit comments