   test :invalid_remote_on_guard do
     assert_compile_fail SyntaxError,
       "nofile:1: cannot invoke remote function Hello.something_that_does_not_exist/0 inside guard",
-      ('case [] do; [] when Hello.something_that_does_not_exist == [] -> :ok; end')
+      'case [] do; [] when Hello.something_that_does_not_exist == [] -> :ok; end'
   end
 
   test :macros_error_stacktrace do
-    assert [{:erlang, :+, [1, :foo], _}, {Foo, :sample, 1, _}|_] =
-      rescue_stacktrace("defmodule Foo do\ndefmacro sample(num), do: num + :foo\ndef other, do: sample(1)\nend")
+    assert [{:erlang, :+, [1, :foo], _}, {ErrorsTest, :sample, 1, _}|_] =
+      rescue_stacktrace(""")
+      defmodule ErrorsTest do
+        defmacro sample(num), do: num + :foo
+        def other, do: sample(1)
+      end
+      """
   end
 
   test :macros_function_clause_stacktrace do
     assert [{__MODULE__, :sample, 1, _}|_] =
-      rescue_stacktrace("defmodule Foo do\nimport Kernel.ErrorsTest\nsample(1)\nend")
+      rescue_stacktrace(""")
+      defmodule ErrorsTest do
+        import Kernel.ErrorsTest
+        sample(1)
+      end
+      """
   end
 
   test :macros_interpreted_function_clause_stacktrace do
-    assert [{Foo, :sample, 1, _}|_] =
-      rescue_stacktrace("defmodule Foo do\ndefmacro sample(0), do: 0\ndef other, do: sample(1)\nend")
+    assert [{ErrorsTest, :sample, 1, _}|_] =
+      rescue_stacktrace(""")
+      defmodule ErrorsTest do
+        defmacro sample(0), do: 0
+        def other, do: sample(1)
+      end
+      """
   end
 
   test :macros_compiled_callback do
-    assert [{Kernel.ErrorsTest, :__before_compile__, [Macro.Env[module: Foo]], _}|_] =
-      rescue_stacktrace("defmodule Foo do\nModule.put_attribute(__MODULE__, :before_compile, Kernel.ErrorsTest)\nend")
+    assert [{Kernel.ErrorsTest, :__before_compile__, [Macro.Env[module: ErrorsTest]], _}|_] =
+      rescue_stacktrace(""")
+      defmodule ErrorsTest do
+        Module.put_attribute(__MODULE__, :before_compile, Kernel.ErrorsTest)
+      end
+      """
   end
 
   defmacro sample(0), do: 0


  test :invalid_access_protocol_not_keywords do
    assert_raise ArgumentError, "expected contents inside brackets to be a Keyword", fn ->
      defmodule Foo do
        def sample(Kernel.ErrorsTest.Config[0]), do: true
      end
    end

    assert_compile_fail SyntaxError,
      "nofile:2: function names should start with lowercase characters or underscore, invalid name Bar",
      '''
      defmodule ErrorsTest do
        def Bar do
          :baz
        end
