Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Setup feature testing with ecukes.

  • Loading branch information...
commit 63579df7bce66a5aaa5907038d77c1727a725e7a 1 parent 9b48787
Brian Zwahr authored
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "emacs/util/espuds"]
+ path = emacs/util/espuds
+ url = https://github.com/rejeep/espuds
View
14 emacs/features/emacs.feature
@@ -0,0 +1,14 @@
+Feature: VimGolf Browser
+ In order to browse and select VimGolf entries
+ As a user
+ I want to use the VimGolf browser
+
+ Scenario: Press TAB on entry to view description
+ Given I open the vimgolf browser
+ And I go to line "3"
+ Then I should not see "Continuing from the last challenge"
+ When I press "TAB"
+ Then I should see "Continuing from the last challenge"
+ When I press "TAB"
+ Then I should not see "Continuing from the last challenge"
+
View
46 emacs/features/step-definitions/emacs-steps.el
@@ -0,0 +1,46 @@
+;; 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 open the vimgolf browser$"
+ (lambda ()
+ (setq *vimgolf-browse-list*
+ '(("50128129201f450002000027"
+ "Complete the circuit grid!"
+ "Continuing from the last challenge, add additional rows to the grid. Change each of the names from 'A1'...'A10' to 'B1'...'B10', 'C1'...'C10', etc, and for each new row add 0.7 to the X values in the (X Y) at the end of each line. ")
+ ("50127eba201f450002000024"
+ "Make the circuit grid!"
+ "Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.")
+ ("500855e60599d90002000073"
+ "Convert pandoc unordered list to a numbered list"
+ "I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?")))
+ (vimgolf-browse)))
+
+(When "^I show the description$"
+ (lambda ()
+ (vimgolf-show-description)))
+
+(Given "^I have \"\\(.+\\)\"$"
+ (lambda (something)
+ ;; Do something
+ ))
+
+(When "^I have \"\\(.+\\)\"$"
+ (lambda (something)
+ ;; Do something
+ ))
+
+(Then "^I should have \"\\(.+\\)\"$"
+ (lambda (something)
+ ;; Do something
+ ))
+
+(And "^I have \"\\(.+\\)\"$"
+ (lambda (something)
+ ;; Do something
+ ))
+
+(But "^I should not have \"\\(.+\\)\"$"
+ (lambda (something)
+ ;; Do something
+ ))
View
37 emacs/features/support/env.el
@@ -0,0 +1,37 @@
+;; 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 emacs-root-path project-directory)
+ (setq emacs-util-path (expand-file-name "util" emacs-root-path)))
+(print emacs-util-path)
+(add-to-list 'load-path emacs-root-path)
+(add-to-list 'load-path (expand-file-name "espuds" emacs-util-path))
+(add-to-list 'load-path (expand-file-name "ert" emacs-util-path))
+
+(require 'vimgolf)
+(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
+ )
1  emacs/util/espuds
@@ -0,0 +1 @@
+Subproject commit 32cbdcce1c056cd5f63ed281d283e76daf4cf510
Please sign in to comment.
Something went wrong with that request. Please try again.