Permalink
Browse files

Create a buster minor-mode to keep our keybinding in.

  • Loading branch information...
magnars committed Jun 16, 2012
1 parent f3fe2dd commit e83c3192cf6c7cdd992c38fd6fb250b251539c72
Showing with 28 additions and 1 deletion.
  1. +11 −1 buster-mode.el
  2. +16 −0 features/buster-mode.feature
  3. +1 −0 features/support/env.el
View
@@ -9,6 +9,16 @@
(delete-char 2)
(insert "//")))
(global-set-key (kbd "C-c C-b td") 'buster-toggle-deffered)
(defvar buster-mode-map (make-sparse-keymap)
"buster-mode keymap")
(define-key buster-mode-map
(kbd "C-c C-b td") 'buster-toggle-deffered)
(define-minor-mode buster-mode
"Buster mode"
nil
" Buster"
buster-mode-map)
(provide 'buster-mode)
@@ -14,6 +14,20 @@ Feature: Toggle deferred
"""
And I go to the front of the word "assert"
And I press "C-c C-b td"
Then I should not see "//contains"
Scenario: Deferring a test
When I insert:
"""
buster.testCase('Building Page', {
"contains title after loading page": function () {
assert.match(document.body.innerHTML, "Zombie TDD");
}
});
"""
And I turn on buster-mode
And I go to the front of the word "assert"
And I press "C-c C-b td"
Then I should see "//contains"
Scenario: Undeferring a test
@@ -25,6 +39,7 @@ Feature: Toggle deferred
}
});
"""
And I turn on buster-mode
And I go to the front of the word "assert"
And I press "C-c C-b td"
Then I should not see "//contains"
@@ -38,6 +53,7 @@ Feature: Toggle deferred
}
});
"""
And I turn on buster-mode
And I go to the front of the word "assert"
And I press "C-c C-b td"
Then I should see "'//contains"
View
@@ -17,6 +17,7 @@
(erase-buffer)
(transient-mark-mode 1)
(cua-mode 0)
(buster-mode 0)
(setq set-mark-default-inactive nil)
(deactivate-mark))

0 comments on commit e83c319

Please sign in to comment.