     test "imports a module only if available" do
       assert "nil" == capture_iex("import_if_available NoSuchModule")
       assert "[1, 2, 3]" == capture_iex("import_if_available Integer; digits 123")
-      assert "[1, 2, 3]" == capture_iex("import_if_available Integer, only: [digits: 1]; digits 123")
+
+      assert "[1, 2, 3]" ==
+               capture_iex("import_if_available Integer, only: [digits: 1]; digits 123")
     end
   end
 
   describe "c" do
     test "compiles a file" do
       assert_raise UndefinedFunctionError, ~r"function Sample\.run/0 is undefined", fn ->
-        Sample.run
+        Sample.run()
       end
 
       filename = "sample.ex"
-      with_file filename, test_module_code(), fn ->
+
+      with_file(filename, test_module_code(), fn ->
         assert c(Path.expand(filename)) == [Sample]
         refute File.exists?("Elixir.Sample.beam")
-        assert Sample.run == :run
-      end
+        assert Sample.run() == :run
+      end)
     after
       cleanup_modules([Sample])
     end
 
     test "handles errors" do
-      ExUnit.CaptureIO.capture_io fn ->
-        with_file "sample.ex", "raise \"oops\"", fn ->
+      ExUnit.CaptureIO.capture_io(fn ->
+        with_file("sample.ex", "raise \"oops\"", fn ->
           assert_raise CompileError, fn -> c("sample.ex") end
-        end
-      end
+        end)
+      end)
     end
 
     test "compiles a file with multiple modules " do
       assert_raise UndefinedFunctionError, ~r"function Sample.run/0 is undefined", fn ->
-        Sample.run
+        Sample.run()
       end
 
       filename = "sample.ex"
-      with_file filename, test_module_code() <> "\n" <> another_test_module(), fn ->
-        assert c(filename) |> Enum.sort == [Sample, Sample2]
-        assert Sample.run == :run
-        assert Sample2.hello == :world
-      end
+
+      with_file(filename, test_module_code() <> "\n" <> another_test_module(), fn ->
+        assert c(filename) |> Enum.sort() == [Sample, Sample2]
+        assert Sample.run() == :run
+        assert Sample2.hello() == :world
+      end)
     after
       cleanup_modules([Sample, Sample2])
     end
 
     test "compiles multiple modules" do
       assert_raise UndefinedFunctionError, ~r"function Sample.run/0 is undefined", fn ->
-        Sample.run
+        Sample.run()
       end
 
       filenames = ["sample1.ex", "sample2.ex"]
-      with_file filenames, [test_module_code(), another_test_module()], fn ->
-        assert c(filenames) |> Enum.sort == [Sample, Sample2]
-        assert Sample.run == :run
-        assert Sample2.hello == :world
-      end
+
+      with_file(filenames, [test_module_code(), another_test_module()], fn ->
+        assert c(filenames) |> Enum.sort() == [Sample, Sample2]
+        assert Sample.run() == :run
+        assert Sample2.hello() == :world
+      end)
     after
       cleanup_modules([Sample, Sample2])
     end
 
     test "compiles Erlang modules" do
       assert_raise UndefinedFunctionError, ~r"function :sample.hello/0 is undefined", fn ->
-        :sample.hello
+        :sample.hello()
       end
 
       filename = "sample.erl"
-      with_file filename, erlang_module_code(), fn ->
+
+      with_file(filename, erlang_module_code(), fn ->
         assert c(filename) == [:sample]
-        assert :sample.hello == :world
+        assert :sample.hello() == :world
         refute File.exists?("sample.beam")
-      end
+      end)
     after
       cleanup_modules([:sample])
     end
 
     test "skips unknown files" do
       assert_raise UndefinedFunctionError, ~r"function :sample.hello/0 is undefined", fn ->
-        :sample.hello
-      end
-
-     filenames = ["sample.erl", "not_found.ex", "sample2.ex"]
-     with_file filenames, [erlang_module_code(), "", another_test_module()], fn ->
-        assert c(filenames) |> Enum.sort == [Sample2, :sample]
-        assert :sample.hello == :world
-        assert Sample2.hello == :world
-      end
+        :sample.hello()
+      end
+
+      filenames = ["sample.erl", "not_found.ex", "sample2.ex"]
+
+      with_file(filenames, [erlang_module_code(), "", another_test_module()], fn ->
+        assert c(filenames) |> Enum.sort() == [Sample2, :sample]
+        assert :sample.hello() == :world
+        assert Sample2.hello() == :world
+      end)
     after
       cleanup_modules([:sample, Sample2])
     end
 
     test "compiles file in path" do
       assert_raise UndefinedFunctionError, ~r"function Sample\.run/0 is undefined", fn ->
-        Sample.run
+        Sample.run()
       end
 
       filename = "sample.ex"
-      with_file filename, test_module_code(), fn ->
+
+      with_file(filename, test_module_code(), fn ->
         assert c(filename, ".") == [Sample]
         assert File.exists?("Elixir.Sample.beam")
-        assert Sample.run == :run
-      end
+        assert Sample.run() == :run
+      end)
     after
       cleanup_modules([Sample])
     end


  describe "runtime_info" do
    test "shows vm information" do
      assert "\n## System and architecture" <> _ =
             capture_io(fn -> runtime_info() end)
    end
  end

  describe "h" do
    test "shows help" do
      assert "* IEx.Helpers\n\nWelcome to Interactive Elixir" <> _
             = capture_iex("h()")
    end

    test "prints module documentation" do
      assert "* IEx.Helpers\n\nWelcome to Interactive Elixir" <> _ =
             capture_io(fn -> h IEx.Helpers end)

      assert capture_io(fn -> h :whatever end) ==
             "Could not load module :whatever, got: nofile\n"

      assert capture_io(fn -> h :lists end) ==
             ":lists is an Erlang module and, as such, it does not have Elixir-style docs\n"
    end

    test "prints function documentation" do
      pwd_h = "* def pwd()\n\nPrints the current working directory.\n\n"
      c_h   = "* def c(files, path \\\\ :in_memory)\n\nCompiles the given files."
      eq_h  = "* def ==(left, right)\n\nReturns `true` if the two items are equal.\n\n"

      assert capture_io(fn -> h IEx.Helpers.pwd/0 end) =~ pwd_h
      assert capture_io(fn -> h IEx.Helpers.c/2 end) =~ c_h
      assert capture_io(fn -> h ==/2 end) =~ eq_h

      assert capture_io(fn -> h IEx.Helpers.c/1 end) =~ c_h
      assert capture_io(fn -> h pwd end) =~ pwd_h
    end

    test "prints __info__ documentation" do
      h_output_module = capture_io(fn -> h Module.__info__ end)
      assert capture_io(fn -> h Module.UnlikelyTo.Exist.__info__ end) == h_output_module
      assert capture_io(fn -> h Module.UnlikelyTo.Exist.__info__/1 end) == h_output_module
      assert capture_io(fn -> h __info__ end) == "No documentation for Kernel.__info__ was found\n"
    end

    test "considers underscored functions without docs by default" do


      files = ["my_behaviour.ex", "impl.ex"]

      with_file(files, [behaviour, impl], fn ->
        assert c(files, ".") |> Enum.sort() == [Impl, MyBehaviour]

        assert capture_io(fn -> h(Impl.first() / 1) end) ==
                 "* @callback first(integer()) :: integer()\n\nDocs for MyBehaviour.first\n"

        assert capture_io(fn -> h(Impl.second() / 1) end) ==
                 "* def second(int)\n\nDocs for Impl.second/1\n"

        assert capture_io(fn -> h(Impl.second() / 2) end) ==
                 "* def second(int1, int2)\n\nDocs for Impl.second/2\n"

        assert capture_io(fn -> h(Impl.first()) end) ==
                 "* @callback first(integer()) :: integer()\n\nDocs for MyBehaviour.first\n"

        assert capture_io(fn -> h(Impl.second()) end) ==
                 "* def second(int)\n\nDocs for Impl.second/1\n* def second(int1, int2)\n\nDocs for Impl.second/2\n"

        assert capture_io(fn -> h(MyBehaviour.first()) end) == """
               No documentation for function MyBehaviour.first was found, but there is a callback with the same name.
               You can view callback documentations with the b/1 helper.\n
               """

        assert capture_io(fn -> h(MyBehaviour.second() / 2) end) == """
               No documentation for function MyBehaviour.second/2 was found, but there is a callback with the same name.
               You can view callback documentations with the b/1 helper.\n
               """

        assert capture_io(fn -> h(MyBehaviour.second() / 3) end) ==
                 "No documentation for MyBehaviour.second/3 was found\n"
      end)
    after
      cleanup_modules([Impl, MyBehaviour])
    end
