File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 (interactive )
5252 (buster-toggle-test-name-prefix " =>" ))
5353
54+ (defvar buster-compile-command " buster-test"
55+ " Command used to run Buster tests" )
56+
5457(defun buster-run-all-tests ()
5558 (interactive )
56- (switch-to-buffer-other-window " *buster-test*" )
57- (call-process " buster-test" nil " *buster-test*" t ))
59+ (compile buster-compile-command t ))
5860
5961(defvar buster-mode-map (make-sparse-keymap )
6062 " buster-mode keymap" )
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ Feature: Run all tests
22
33 Scenario : Opens a buffer with test results
44 When I turn on buster-mode
5+ And I have passing tests
56 And I press "C-c C-b ra"
6- And I switch to buffer "*buster-test*"
7+ And I wait for the compilation to finish
8+ And I switch to buffer "*compilation*"
79 Then I should see "0 timeouts"
Original file line number Diff line number Diff line change 1212 (message " Can not go to character '%s ' since it does not exist in the current buffer: %s " ))
1313 (assert search nil message word (espuds-buffer-contents))
1414 (if (string-equal " front" pos) (backward-word )))))
15+
16+ (When " ^I wait for the compilation to finish$"
17+ (lambda ()
18+ (setq ecukes--waiting-for-compilation t )
19+
20+ (defun ecukes--compilation-finished (&rest ignore )
21+ (setq ecukes--waiting-for-compilation nil )
22+ (remove-hook 'compilation-finish-functions 'ecukes--compilation-finished ))
23+
24+ (add-hook 'compilation-finish-functions 'ecukes--compilation-finished )
25+
26+ (while ecukes--waiting-for-compilation
27+ (accept-process-output nil 0.005 ))
28+ ))
29+
30+ (And " ^I have passing tests$"
31+ (lambda ()
32+ (setq buster-compile-command " ./buster-test" )))
You can’t perform that action at this time.
0 commit comments