Permalink
Browse files

Run tests within Emacs.

  • Loading branch information...
magnars committed Jun 16, 2012
1 parent f5af5d3 commit 714872b042722c906d083526a929d96bab04ff31
Showing with 31 additions and 2 deletions.
  1. +1 −0 README.md
  2. +7 −0 buster-mode.el
  3. +14 −0 buster-test
  4. +7 −0 features/run-all-tests.feature
  5. +2 −2 run-tests.watchr
View
@@ -9,6 +9,7 @@ All keybindings in buster-mode start with `C-c C-b` and then a two-letter mnemon
* `td`: toggle-deferred will toggle // in the name of the current test.
* `tf`: toggle-focus-rocket will toggle => in the name of the current test.
+* `ra`: run-all-tests
## Development
View
@@ -18,13 +18,20 @@
(interactive)
(buster-toggle-test-name-prefix "=>"))
+(defun buster-run-all-tests ()
+ (interactive)
+ (switch-to-buffer-other-window "*buster-test*")
+ (call-process "buster-test" nil "*buster-test*" t))
+
(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-key buster-mode-map
(kbd "C-c C-b tf") 'buster-toggle-focus-rocket)
+(define-key buster-mode-map
+ (kbd "C-c C-b ra") 'buster-run-all-tests)
(define-minor-mode buster-mode
"Buster mode"
View
@@ -0,0 +1,14 @@
+echo "Configuration: .......
+cleanReporter: .....
+lintScanner: .....................
+growlReporter: ........
+jslint-linter: .............
+lintReporter: ...
+watchForLint: ..
+newFileReporter: .....
+pluralize: ..
+print: ......
+summaryReporter: ........A.
+repository: .................
+checkedFile: ............
+13 test cases, 110 tests, 148 assertions, 0 failures, 0 errors, 0 timeouts"
@@ -0,0 +1,7 @@
+Feature: Run all tests
+
+ Scenario: Opens a buffer with test results
+ When I turn on buster-mode
+ And I press "C-c C-b ra"
+ And I switch to buffer "*buster-test*"
+ Then I should see "0 timeouts"
View
@@ -7,13 +7,13 @@ end
def run_all_tests
system('clear')
- result = run "./util/ecukes/ecukes"
+ result = run "env PATH=.:$PATH ./util/ecukes/ecukes"
puts result
end
def run_test(file)
system('clear')
- result = run "./util/ecukes/ecukes #{file}"
+ result = run "env PATH=.:$PATH ./util/ecukes/ecukes #{file}"
puts result
end

0 comments on commit 714872b

Please sign in to comment.