Skip to content
This repository
Browse code

add ecukes tests

  • Loading branch information...
commit b6d30f4376bcf677e7d14b9509cae24c45b63021 1 parent 2bc1dc3
Donald Ephraim Curtis authored December 30, 2012
8  features/initialization.feature
... ...
@@ -0,0 +1,8 @@
  1
+Feature: Initialization
  2
+
  3
+  Scenario: read recipes
  4
+    Given read recipes
  5
+
  6
+  Scenario: package-build initialization
  7
+    Given initialization
  8
+  
22  features/step-definitions/melpa-steps.el
... ...
@@ -0,0 +1,22 @@
  1
+(Given "^initialization$"
  2
+       (lambda ()
  3
+         (package-build-initialize)))
  4
+
  5
+(Given "^read recipes$"
  6
+       (lambda ()
  7
+         (pb/read-recipes)))
  8
+
  9
+(Given "^capture messages to \\(.+\\)$"
  10
+       (lambda (varby)
  11
+         (message "****** %s" varby)
  12
+         (collect-messages-to varby)))
  13
+
  14
+(Given "^package initialization$"
  15
+       (lambda ()
  16
+         (package-initialize)))
  17
+
  18
+(Then "^\\(.+\\) should be empty"
  19
+      (lambda (var)
  20
+        (message "//////// %s" (eval (intern var)))
  21
+        (let ((varsym (intern var)))
  22
+          (assert (not (eval varsym)) nil "Variable %s is not empty." var))))
43  features/support/env.el
... ...
@@ -0,0 +1,43 @@
  1
+;; This is an example of how you could set up this file. This setup
  2
+;; requires a directory called util in the project root and that the
  3
+;; util directory contains the testing tools ert and espuds.
  4
+
  5
+(let* ((features-directory
  6
+        (file-name-directory
  7
+         (directory-file-name (file-name-directory load-file-name))))
  8
+       (project-directory
  9
+        (file-name-directory
  10
+         (directory-file-name features-directory))))
  11
+  (setq melpa-root-path project-directory)
  12
+  (setq melpa-util-path (expand-file-name "util" melpa-root-path)))
  13
+
  14
+(add-to-list 'load-path melpa-root-path)
  15
+(add-to-list 'load-path (expand-file-name "espuds" melpa-util-path))
  16
+
  17
+(require 'package-build)
  18
+(require 'ert)
  19
+(require 'espuds)
  20
+
  21
+
  22
+(Setup
  23
+ ;; Before anything has run
  24
+ )
  25
+
  26
+(Before
  27
+ ;; Before each scenario is run
  28
+ (defmacro collect-messages-to (var)
  29
+   (let ((varsym (intern (eval var))))
  30
+     (set varsym '())
  31
+     `(defadvice message (before message (format-string &rest args) activate)
  32
+        (add-to-list ',varsym (ignore-errors (format format-string args))))
  33
+     ))
  34
+ )
  35
+
  36
+(After
  37
+ ;; After each scenario is run
  38
+ )
  39
+
  40
+(Teardown
  41
+ ;; After when everything has been run
  42
+ )
  43
+
12  run-travis-ci.sh
... ...
@@ -0,0 +1,12 @@
  1
+#!/bin/sh -e
  2
+
  3
+cd "$(dirname "$0")"
  4
+
  5
+ECUKES_EMACS=${EMACS:-$(which emacs)}
  6
+
  7
+echo "*** Emacs version ***"
  8
+echo "ECUKES_EMACS = $ECUKES_EMACS"
  9
+"$ECUKES_EMACS" --version
  10
+echo
  11
+
  12
+exec ./util/ecukes/ecukes --graphical

1 note on commit b6d30f4

Steve Purcell
Collaborator

Awesomesauce.

Please sign in to comment.
Something went wrong with that request. Please try again.