     E.g.) resource.open(filename)
     """
     test "opens resource" do
-      RPNCalculator.Output.write(@resource, @filename, @equation)
-      assert_received {:open, @filename}, @use_open_error_message
+      resource = __MODULE__
+      filename = "filename"
+      equation = "1 1 +"
+
+      RPNCalculator.Output.write(resource, filename, equation)
+      assert_received {:open, ^filename}, @use_open_error_message
     end
 
     @tag :pending

    E.g.) resource.close(filename)
    """
    test "closes resource" do
      RPNCalculator.Output.write(__MODULE__, @filename, @equation)
      assert_received :close, @use_close_error_message
    end

    @tag :pending
    test "rescues and returns error tuple from raised error" do
      assert {:error, "Unable to write to resource"} ==
               RPNCalculator.Output.write(@resource, @bad_filename, @equation)
    end

    @tag :pending
    test "closes resource even when rescuing from raised error" do
      RPNCalculator.Output.write(@resource, @bad_filename, @equation)
      assert_received :close, "write/3 should close the `resource` even if an error is raised"
    end
  end

  describe "write/3" do
    # @tag :pending
    test "returns ok tuple if function succeeds" do
      resource = __MODULE__
      filename = "filename"
      equation = "1 1 +"

      assert {:ok, equation} == RPNCalculator.Output.write(resource, filename, equation)
    end

    @tag :pending
