ruby: document previous commit and move function to funcs.el

This commit is contained in:
syl20bnr 2016-06-06 22:19:14 -04:00
parent 9ca6306736
commit 8f65b1b8be
3 changed files with 17 additions and 3 deletions

View File

@ -147,6 +147,7 @@ When =ruby-test-runner= equals =rspec=.
| ~SPC m t a~ | run all specs |
| ~SPC m t b~ | run current spec file |
| ~SPC m t c~ | run the current spec file and subsequent ones |
| ~SPC m t d~ | run tests in a directory |
| ~SPC m t e~ | mark example as pending |
| ~SPC m t f~ | run method |
| ~SPC m t l~ | run last failed spec |

View File

@ -0,0 +1,16 @@
;;; funcs.el --- Ruby Layer functions File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun ruby/rspec-verify-directory (dir)
"Launch tests in DIR directory.
Called interactively it prompts for a directory."
(interactive "Drspec directory: ")
(rspec-run-single-file dir (rspec-core-options)))

View File

@ -148,9 +148,6 @@
;; setup the hook via an autoload
:config
(progn
(defun ruby/rspec-verify-directory (dir)
(interactive "Drspec directory: ")
(rspec-run-single-file dir (rspec-core-options)))
(spacemacs|hide-lighter rspec-mode)
(dolist (mode '(ruby-mode enh-ruby-mode))
(spacemacs/set-leader-keys-for-major-mode mode