Skip to content

Commit

Permalink
Drop "test_" from generated method name
Browse files Browse the repository at this point in the history
Resolves #33
  • Loading branch information
Jake Romer committed Jun 25, 2016
1 parent 6351c68 commit bd9688e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion minitest.el
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ The current directory is assumed to be the project's root otherwise."
(error "No test found. Make sure you are on a file that has `def test_foo` or `test \"foo\"`")))

(defun minitest--post-command (cmd str)
(format "test_%s" (replace-regexp-in-string "[\s#:]" "_" str)))
(format "%s" (replace-regexp-in-string "[\s#:]" "_" str)))

(defun minitest-rerun ()
"Run the last command"
Expand Down
2 changes: 1 addition & 1 deletion test/minitest-unit-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

(ert-deftest test-minitest--post-command ()
(defvar test-description "#method_name behavior of Module::Class")
(defvar method-name "test__method_name_behavior_of_Module__Class")
(defvar method-name "_method_name_behavior_of_Module__Class")
(should (equal method-name (minitest--post-command "test" test-description)))
(should (equal method-name (minitest--post-command "it" test-description))))

Expand Down

0 comments on commit bd9688e

Please sign in to comment.