Permalink
Browse files

`C-c C-b td`: Implemented toggle-deffered

  • Loading branch information...
magnars committed Jun 16, 2012
1 parent e123fab commit b4a79c4eeba0778ac97b883442a4bd30d28eef74
Showing with 26 additions and 0 deletions.
  1. +13 −0 buster-mode.el
  2. +13 −0 features/buster-mode.feature
View
@@ -1 +1,14 @@
+(defun buster-go-to-current-test ()
+ (search-backward-regexp "\"[^ ]* .+\": function"))
+
+(defun buster-toggle-deffered ()
+ (interactive)
+ (buster-go-to-current-test)
+ (forward-char 1)
+ (if (looking-at "//")
+ (delete-char 2)
+ (insert "//")))
+
+(global-set-key (kbd "C-c C-b td") 'buster-toggle-deffered)
+
(provide 'buster-mode)
@@ -15,3 +15,16 @@ Feature: Toggle deferred
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
+ When I insert:
+ """
+ buster.testCase('Building Page', {
+ "//contains title after loading page": function () {
+ assert.match(document.body.innerHTML, "Zombie TDD");
+ }
+ });
+ """
+ And I go to the front of the word "assert"
+ And I press "C-c C-b td"
+ Then I should not see "//contains"

0 comments on commit b4a79c4

Please sign in to comment.