File tree Expand file tree Collapse file tree 7 files changed +133
-0
lines changed Expand file tree Collapse file tree 7 files changed +133
-0
lines changed Original file line number Diff line number Diff line change 1+ -L .
Original file line number Diff line number Diff line change 88 (depends-on " ecukes" )
99 (depends-on " ert-runner" )
1010 (depends-on " el-mock" )
11+ (depends-on " undercover" )
1112 (depends-on " cask-package-toolset" ))
Original file line number Diff line number Diff line change 1+ Feature : Do Some things
2+ In order to do something
3+ As a user
4+ I want to do something
5+
6+ Scenario : Do Something
7+ Given I have "something"
8+ When I have "something"
9+ Then I should have "something"
10+ And I should have "something"
11+ But I should not have "something"
Original file line number Diff line number Diff line change 1+ ; ; This file contains your project specific step definitions. All
2+ ; ; files in this directory whose names end with "-steps.el" will be
3+ ; ; loaded automatically by Ecukes.
4+
5+ (Given " ^I have \" \\ (.+\\ )\" $"
6+ (lambda (something )
7+ ; ; ...
8+ ))
9+
10+ (When " ^I have \" \\ (.+\\ )\" $"
11+ (lambda (something )
12+ ; ; ...
13+ ))
14+
15+ (Then " ^I should have \" \\ (.+\\ )\" $"
16+ (lambda (something )
17+ ; ; ...
18+ ))
19+
20+ (And " ^I have \" \\ (.+\\ )\" $"
21+ (lambda (something )
22+ ; ; ...
23+ ))
24+
25+ (But " ^I should not have \" \\ (.+\\ )\" $"
26+ (lambda (something )
27+ ; ; ...
28+ ))
Original file line number Diff line number Diff line change 1+ (require 'f )
2+
3+ (defvar emacs-fireplace-support-path
4+ (f-dirname load-file-name))
5+
6+ (defvar emacs-fireplace-features-path
7+ (f-parent emacs-fireplace-support-path))
8+
9+ (defvar emacs-fireplace-root-path
10+ (f-parent emacs-fireplace-features-path))
11+
12+ (add-to-list 'load-path emacs-fireplace-root-path)
13+
14+ (require 'undercover )
15+ (undercover " *.el"
16+ (:exclude " *-test.el" )
17+ (:report-file " /tmp/undercover-report.json" ))
18+ (require 'emacs-fireplace )
19+ (require 'espuds )
20+ (require 'ert )
21+
22+ (Setup
23+ ; ; Before anything has run
24+ )
25+
26+ (Before
27+ ; ; Before each scenario is run
28+ )
29+
30+ (After
31+ ; ; After each scenario is run
32+ )
33+
34+ (Teardown
35+ ; ; After when everything has been run
36+ )
Original file line number Diff line number Diff line change 1+ ; ;; Test for `emacs-fireplace'
2+
3+ ; ;; Commentary:
4+ ; ; These are the tests for `emacs-fireplace'
5+
6+ ; ;; Code:
7+
8+ (ert-deftest emacs-fireplace-should-not-pass ()
9+ (should-not nil ))
10+
Original file line number Diff line number Diff line change 1+ ; ;; test-helper --- Test helper for emacs-fireplace
2+
3+ ; ;; Commentary:
4+ ; ; test helper inspired from https://github.com/tonini/overseer.el/blob/master/test/test-helper.el
5+
6+ ; ;; Code:
7+
8+ (require 'f )
9+
10+ (defvar cpt-path
11+ (f-parent (f-this-file)))
12+
13+ (defvar emacs-fireplace-test-path
14+ (f-dirname (f-this-file)))
15+
16+ (defvar emacs-fireplace-root-path
17+ (f-parent emacs-fireplace-test-path))
18+
19+ (defvar emacs-fireplace-sandbox-path
20+ (f-expand " sandbox" emacs-fireplace-test-path))
21+
22+ (when (f-exists? emacs-fireplace-sandbox-path)
23+ (error " Something is already in %s . Check and destroy it yourself " emacs-fireplace-sandbox-path))
24+
25+ (defmacro within-sandbox (&rest body )
26+ " Evaluate BODY in an empty sandbox directory."
27+ `(let ((default-directory emacs-fireplace-sandbox-path))
28+ (when (f-exists? emacs-fireplace-sandbox-path)
29+ (f-delete default-directory :force ))
30+ (f-mkdir emacs-fireplace-sandbox-path)
31+ ,@body
32+ (f-delete default-directory :force )))
33+
34+ (require 'ert )
35+ (require 'el-mock )
36+ (eval-when-compile
37+ (require 'cl ))
38+ (require 'undercover )
39+ (undercover " *.el"
40+ (:exclude " *-test.el" )
41+ (:send-report nil )
42+ (:report-file " /tmp/undercover-report.json" ))
43+ (require 'emacs-fireplace )
44+
45+ (provide 'test-helper )
46+ ; ;; test-helper.el ends here
You can’t perform that action at this time.
0 commit comments