Add missing keybindings to rspec-mode in ruby layer

Commands `rspec-toggle-spec-and-target` and
`rspec-toggle-spec-and-target-find-example` were missing.
This commit is contained in:
Adam Sokolnicki 2016-02-07 12:41:32 +01:00 committed by Fabien Dubosson
parent 86ab9e7eeb
commit c4cf602255
2 changed files with 24 additions and 20 deletions

View File

@ -128,17 +128,19 @@ directory local variables.
*** RSpec-mode
When =ruby-test-runner= equals =rspec=.
| Key binding | Description |
|-------------+-----------------------------------------------|
| ~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 e~ | mark example as pending |
| ~SPC m t f~ | run method |
| ~SPC m t l~ | run last failed spec |
| ~SPC m t m~ | run specs related to the current buffer |
| ~SPC m t r~ | re-run last spec |
| ~SPC m t t~ | run spec at pointer |
| Key binding | Description |
|---------------+--------------------------------------------------------|
| ~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 e~ | mark example as pending |
| ~SPC m t f~ | run method |
| ~SPC m t l~ | run last failed spec |
| ~SPC m t m~ | run specs related to the current buffer |
| ~SPC m t r~ | re-run last spec |
| ~SPC m t t~ | run spec at pointer |
| ~SPC m t TAB~ | toggle between spec's and target's buffer |
| ~SPC m t ~~ | toggle between spec's and target's buffer find example |
*** Ruby-test-mode
When =ruby-test-runner= equals =ruby-test=.

View File

@ -160,15 +160,17 @@
(spacemacs|hide-lighter rspec-mode)
(dolist (mode '(ruby-mode enh-ruby-mode))
(spacemacs/set-leader-keys-for-major-mode mode
"ta" 'rspec-verify-all
"tb" 'rspec-verify
"tc" 'rspec-verify-continue
"te" 'rspec-toggle-example-pendingness
"tf" 'rspec-verify-method
"tl" 'rspec-run-last-failed
"tm" 'rspec-verify-matching
"tr" 'rspec-rerun
"tt" 'rspec-verify-single)))))
"ta" 'rspec-verify-all
"tb" 'rspec-verify
"tc" 'rspec-verify-continue
"te" 'rspec-toggle-example-pendingness
"tf" 'rspec-verify-method
"tl" 'rspec-run-last-failed
"tm" 'rspec-verify-matching
"tr" 'rspec-rerun
"tt" 'rspec-verify-single
"t~" 'rspec-toggle-spec-and-target-find-example
"t TAB" 'rspec-toggle-spec-and-target)))))
(defun ruby/init-rubocop ()
(use-package rubocop