[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f21db9e: Fix Flymake's ruby-mode tests when user ha
From: |
João Távora |
Subject: |
[Emacs-diffs] master f21db9e: Fix Flymake's ruby-mode tests when user has "rubocop" installed |
Date: |
Mon, 21 May 2018 14:23:51 -0400 (EDT) |
branch: master
commit f21db9e1206f830ee5e991a26f9e30056f68efb8
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix Flymake's ruby-mode tests when user has "rubocop" installed
The Flymake test suite fails if the "rubocop" program is installed,
because the ruby-flymake-rubocop backend is selected automatically by
ruby-flymake-auto. The test was designed for ruby-flymake-simple,
tough, and fails.
* test/lisp/progmodes/flymake-tests.el (ruby-backend): Ensure
this test runs exclusively with the ruby-flymake-simple backend.
---
test/lisp/progmodes/flymake-tests.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/test/lisp/progmodes/flymake-tests.el
b/test/lisp/progmodes/flymake-tests.el
index 5118e30..bba1f12 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -118,6 +118,7 @@ SEVERITY-PREDICATE is used to setup
(flymake-goto-prev-error)
(should (eq 'flymake-error (face-at-point)))))
+(defvar ruby-mode-hook)
(ert-deftest ruby-backend ()
"Test the ruby backend"
(skip-unless (executable-find "ruby"))
@@ -129,11 +130,14 @@ SEVERITY-PREDICATE is used to setup
;; for this particular yuckiness
(abbreviated-home-dir nil))
(unwind-protect
- (flymake-tests--with-flymake ("test.rb")
- (flymake-goto-next-error)
- (should (eq 'flymake-warning (face-at-point)))
- (flymake-goto-next-error)
- (should (eq 'flymake-error (face-at-point))))
+ (let ((ruby-mode-hook
+ (lambda ()
+ (setq flymake-diagnostic-functions '(ruby-flymake-simple)))))
+ (flymake-tests--with-flymake ("test.rb")
+ (flymake-goto-next-error)
+ (should (eq 'flymake-warning (face-at-point)))
+ (flymake-goto-next-error)
+ (should (eq 'flymake-error (face-at-point)))))
(delete-directory tempdir t))))
(ert-deftest different-diagnostic-types ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f21db9e: Fix Flymake's ruby-mode tests when user has "rubocop" installed,
João Távora <=