From e91f599f13660a2d60831455f650aa44a3bfb508 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 7 Jan 2020 16:25:30 -0800 Subject: Move test if oni-alert loads into bats test With bats I can better test Emacs from a clean state. --- test/oni-alert-test.el | 9 ++------- test/oni-alert.bats | 9 +++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 test/oni-alert.bats diff --git a/test/oni-alert-test.el b/test/oni-alert-test.el index f8574e2..81e49a4 100644 --- a/test/oni-alert-test.el +++ b/test/oni-alert-test.el @@ -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 () - "Test that `oni-alert' test the default style." - (require 'alert) + "Test that `oni-alert' changes the default style." + (require 'oni-alert) (should (eql alert-default-style 'libnotify))) diff --git a/test/oni-alert.bats b/test/oni-alert.bats new file mode 100644 index 0000000..8c42fdf --- /dev/null +++ b/test/oni-alert.bats @@ -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" ] +} -- cgit v1.2.3-54-g00ecf