Skip to content

Commit

Permalink
Support hipster quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
magnars committed Jun 16, 2012
1 parent b4a79c4 commit f3fe2dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buster-mode.el
@@ -1,9 +1,9 @@
(defun buster-go-to-current-test () (defun buster-goto-current-test ()
(search-backward-regexp "\"[^ ]* .+\": function")) (search-backward-regexp "[\"'][^ ]* .+[\"']: function" nil t))


(defun buster-toggle-deffered () (defun buster-toggle-deffered ()
(interactive) (interactive)
(buster-go-to-current-test) (buster-goto-current-test)
(forward-char 1) (forward-char 1)
(if (looking-at "//") (if (looking-at "//")
(delete-char 2) (delete-char 2)
Expand Down
13 changes: 13 additions & 0 deletions features/buster-mode.feature
Expand Up @@ -28,3 +28,16 @@ Feature: Toggle deferred
And I go to the front of the word "assert" And I go to the front of the word "assert"
And I press "C-c C-b td" And I press "C-c C-b td"
Then I should not see "//contains" Then I should not see "//contains"

Scenario: Deferring a single quoted 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 see "'//contains"

0 comments on commit f3fe2dd

Please sign in to comment.