1
0
Fork 0

Move test if oni-alert loads into bats test

With bats I can better test Emacs from a clean state.
This commit is contained in:
Tom Willemse 2020-01-07 16:25:30 -08:00
parent 0115885ae5
commit e91f599f13
2 changed files with 11 additions and 7 deletions

View file

@ -1,9 +1,4 @@
(ert-deftest oni-alert-test-autoloads ()
"Test that `oni-alert' gets loaded automatically."
(require 'alert)
(should (featurep 'oni-alert)))
(ert-deftest oni-alert-test-sets-default-style () (ert-deftest oni-alert-test-sets-default-style ()
"Test that `oni-alert' test the default style." "Test that `oni-alert' changes the default style."
(require 'alert) (require 'oni-alert)
(should (eql alert-default-style 'libnotify))) (should (eql alert-default-style 'libnotify)))

9
test/oni-alert.bats Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bats
@test "Loading alert loads oni-alert" {
run emacs -batch -l package -f package-initialize \
-l alert \
-eval "(prin1 (featurep 'oni-alert))"
[ "$output" = "t" ]
}