From 89f38b3945c3f8959f03482a2fcf18df5c7b8a3d Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Thu, 11 Sep 2014 12:33:49 -0700 Subject: [PATCH] test(emacs/features): add ecukes template --- src/emacs/features/emacs.feature | 11 +++++++ .../features/step-definitions/emacs-steps.el | 28 ++++++++++++++++ src/emacs/features/support/env.el | 32 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 src/emacs/features/emacs.feature create mode 100644 src/emacs/features/step-definitions/emacs-steps.el create mode 100644 src/emacs/features/support/env.el diff --git a/src/emacs/features/emacs.feature b/src/emacs/features/emacs.feature new file mode 100644 index 000000000..979516d84 --- /dev/null +++ b/src/emacs/features/emacs.feature @@ -0,0 +1,11 @@ +Feature: Do Some things + In order to do something + As a user + I want to do something + + Scenario: Do Something + Given I have "something" + When I have "something" + Then I should have "something" + And I should have "something" + But I should not have "something" diff --git a/src/emacs/features/step-definitions/emacs-steps.el b/src/emacs/features/step-definitions/emacs-steps.el new file mode 100644 index 000000000..21bddec13 --- /dev/null +++ b/src/emacs/features/step-definitions/emacs-steps.el @@ -0,0 +1,28 @@ +;; This file contains your project specific step definitions. All +;; files in this directory whose names end with "-steps.el" will be +;; loaded automatically by Ecukes. + +(Given "^I have \"\\(.+\\)\"$" + (lambda (something) + ;; ... + )) + +(When "^I have \"\\(.+\\)\"$" + (lambda (something) + ;; ... + )) + +(Then "^I should have \"\\(.+\\)\"$" + (lambda (something) + ;; ... + )) + +(And "^I have \"\\(.+\\)\"$" + (lambda (something) + ;; ... + )) + +(But "^I should not have \"\\(.+\\)\"$" + (lambda (something) + ;; ... + )) diff --git a/src/emacs/features/support/env.el b/src/emacs/features/support/env.el new file mode 100644 index 000000000..aa09e4813 --- /dev/null +++ b/src/emacs/features/support/env.el @@ -0,0 +1,32 @@ +(require 'f) + +(defvar emacs-support-path + (f-dirname load-file-name)) + +(defvar emacs-features-path + (f-parent emacs-support-path)) + +(defvar emacs-root-path + (f-parent emacs-features-path)) + +(add-to-list 'load-path emacs-root-path) + +(require 'emacs) +(require 'espuds) +(require 'ert) + +(Setup + ;; Before anything has run + ) + +(Before + ;; Before each scenario is run + ) + +(After + ;; After each scenario is run + ) + +(Teardown + ;; After when everything has been run + )