Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add ecukes tests

  • Loading branch information...
commit b6d30f4376bcf677e7d14b9509cae24c45b63021 1 parent 2bc1dc3
@milkypostman authored
View
8 features/initialization.feature
@@ -0,0 +1,8 @@
+Feature: Initialization
+
+ Scenario: read recipes
+ Given read recipes
+
+ Scenario: package-build initialization
+ Given initialization
+
View
22 features/step-definitions/melpa-steps.el
@@ -0,0 +1,22 @@
+(Given "^initialization$"
+ (lambda ()
+ (package-build-initialize)))
+
+(Given "^read recipes$"
+ (lambda ()
+ (pb/read-recipes)))
+
+(Given "^capture messages to \\(.+\\)$"
+ (lambda (varby)
+ (message "****** %s" varby)
+ (collect-messages-to varby)))
+
+(Given "^package initialization$"
+ (lambda ()
+ (package-initialize)))
+
+(Then "^\\(.+\\) should be empty"
+ (lambda (var)
+ (message "//////// %s" (eval (intern var)))
+ (let ((varsym (intern var)))
+ (assert (not (eval varsym)) nil "Variable %s is not empty." var))))
View
43 features/support/env.el
@@ -0,0 +1,43 @@
+;; This is an example of how you could set up this file. This setup
+;; requires a directory called util in the project root and that the
+;; util directory contains the testing tools ert and espuds.
+
+(let* ((features-directory
+ (file-name-directory
+ (directory-file-name (file-name-directory load-file-name))))
+ (project-directory
+ (file-name-directory
+ (directory-file-name features-directory))))
+ (setq melpa-root-path project-directory)
+ (setq melpa-util-path (expand-file-name "util" melpa-root-path)))
+
+(add-to-list 'load-path melpa-root-path)
+(add-to-list 'load-path (expand-file-name "espuds" melpa-util-path))
+
+(require 'package-build)
+(require 'ert)
+(require 'espuds)
+
+
+(Setup
+ ;; Before anything has run
+ )
+
+(Before
+ ;; Before each scenario is run
+ (defmacro collect-messages-to (var)
+ (let ((varsym (intern (eval var))))
+ (set varsym '())
+ `(defadvice message (before message (format-string &rest args) activate)
+ (add-to-list ',varsym (ignore-errors (format format-string args))))
+ ))
+ )
+
+(After
+ ;; After each scenario is run
+ )
+
+(Teardown
+ ;; After when everything has been run
+ )
+
View
12 run-travis-ci.sh
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+cd "$(dirname "$0")"
+
+ECUKES_EMACS=${EMACS:-$(which emacs)}
+
+echo "*** Emacs version ***"
+echo "ECUKES_EMACS = $ECUKES_EMACS"
+"$ECUKES_EMACS" --version
+echo
+
+exec ./util/ecukes/ecukes --graphical

1 comment on commit b6d30f4

@purcell
Collaborator

Awesomesauce.

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