File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [submodule "util/ecukes "]
2+ path = util/ecukes
3+ url = https://github.com/rejeep/ecukes.git
4+ [submodule "util/espuds "]
5+ path = util/espuds
6+ url = https://github.com/rejeep/espuds.git
Original file line number Diff line number Diff line change @@ -8,3 +8,15 @@ with [Buster.js](http://busterjs.org).
88All keybindings in buster-mode start with ` C-c C-b ` and then a two-letter mnemonic shortcut.
99
1010* ` td ` : toggle-deferred will toggle // in the name of the current test.
11+
12+ ## Development
13+
14+ To fetch the test dependencies:
15+
16+ $ cd /path/to/buster-mode
17+ $ git submodule init
18+ $ git submodule update
19+
20+ Run the tests with:
21+
22+ $ ./util/ecukes/ecukes features
Original file line number Diff line number Diff line change 1+ (provide 'buster-mode )
Original file line number Diff line number Diff line change 1+ Feature : Toggle deferred
2+ In order to quickly defer a test
3+ As a buster using emacs user
4+ I want to just press key please
5+
6+ Scenario : Deferring a test
7+ When I insert:
8+ """
9+ buster.testCase('Building Page', {
10+ "contains title after loading page": function () {
11+ assert.match(document.body.innerHTML, "Zombie TDD");
12+ }
13+ });
14+ """
15+ And I go to the front of the word "assert"
16+ And I press "C-c C-b td"
17+ Then I should see "//contains"
Original file line number Diff line number Diff line change 1+ (When " ^I go to character \" \\ (.+\\ )\" $"
2+ (lambda (char )
3+ (goto-char (point-min ))
4+ (let ((search (re-search-forward (format " %s " char) nil t ))
5+ (message " Can not go to character '%s ' since it does not exist in the current buffer: %s " ))
6+ (assert search nil message char (espuds-buffer-contents)))))
7+
8+ (When " ^I go to the \\ (front\\ |end\\ ) of the word \" \\ (.+\\ )\" $"
9+ (lambda (pos word )
10+ (goto-char (point-min ))
11+ (let ((search (re-search-forward (format " %s " word) nil t ))
12+ (message " Can not go to character '%s ' since it does not exist in the current buffer: %s " ))
13+ (assert search nil message word (espuds-buffer-contents))
14+ (if (string-equal " front" pos) (backward-word )))))
Original file line number Diff line number Diff line change 1+ (let* ((current-directory (file-name-directory load-file-name))
2+ (features-directory (expand-file-name " .." current-directory))
3+ (project-directory (expand-file-name " .." features-directory)))
4+ (setq buster-mode-root-path project-directory)
5+ (setq buster-mode-util-path (expand-file-name " util" project-directory)))
6+
7+ (add-to-list 'load-path buster-mode-root-path)
8+ (add-to-list 'load-path (expand-file-name " espuds" buster-mode-util-path))
9+
10+ (require 'buster-mode )
11+ (require 'espuds )
12+ (require 'ert )
13+
14+ (Before
15+ (switch-to-buffer
16+ (get-buffer-create " *buster-mode*" ))
17+ (erase-buffer )
18+ (transient-mark-mode 1 )
19+ (cua-mode 0 )
20+ (setq set-mark-default-inactive nil )
21+ (deactivate-mark ))
22+
23+ (After)
You can’t perform that action at this time.
0 commit comments