Wilfred / emacs-refactor

language-specific refactoring in Emacs
GNU General Public License v3.0
348 stars 27 forks source link

let binding is confused by ert-deftest #34

Closed Wilfred closed 6 years ago

Wilfred commented 7 years ago

Before:

(ert-deftest helpful--format-docstring ()
  "Ensure we create links in docstrings."
  (helpful--format-docstring "foo `message'."))

After:

(let ((formatted (helpful--format-docstring "foo `message'.")))
  (ert-deftest helpful--format-docstring ()
    "Ensure we create links in docstrings."
    formatted))

Expected:

(ert-deftest helpful--format-docstring ()
  "Ensure we create links in docstrings."
  (let ((formatted (helpful--format-docstring "foo `message'.")))
    formatted))