Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not use dash's it, since it breaks when byte compiling.

  • Loading branch information...
commit c9159135dafe1f3c941c648fc30e44982ec6f524 1 parent 2dc5075
@rejeep rejeep authored
View
19 ecukes-helpers.el
@@ -3,13 +3,24 @@
(defun ecukes-feature-steps (features)
"Return all steps in all FEATURES."
(let* ((scenarios
- (-flatten (--map (ecukes-feature-scenarios it) features)))
+ (-flatten
+ (-map
+ (lambda (feature)
+ (ecukes-feature-scenarios feature)) features)))
(backgrounds
- (-reject 'null (--map (ecukes-feature-background it) features)))
+ (-reject
+ 'null
+ (-map
+ (lambda (feature)
+ (ecukes-feature-background feature)) features)))
(scenario-steps
- (--map (ecukes-scenario-steps it) scenarios))
+ (-map
+ (lambda (scenario)
+ (ecukes-scenario-steps scenario)) scenarios))
(background-steps
- (--map (ecukes-background-steps it) backgrounds)))
+ (-map
+ (lambda (background)
+ (ecukes-background-steps background)) backgrounds)))
(-flatten (-concat background-steps scenario-steps))))
(provide 'ecukes-helpers)
View
11 ecukes-print.el
@@ -16,7 +16,10 @@
(lambda (step)
(let ((step-body (ecukes-print-step-body step))
(step-string (ecukes-print-step-string step)))
- (unless (--any? (equal step-body it) step-bodies)
+ (unless
+ (-any?
+ (lambda (body)
+ (equal step-body body)) step-bodies)
(add-to-list 'step-bodies step-body)
(ecukes-print-message "%s\n" step-string)))))))
@@ -77,7 +80,9 @@
(ecukes-print-message "Feature: %s" header)
(let ((ecukes-print-offset 2)
(description (ecukes-intro-description intro)))
- (--each description (ecukes-print-message it)))
+ (-each
+ description
+ (lambda (row) (ecukes-print-message row))))
(ecukes-print-newline)))
(defun ecukes-print-background-header ()
@@ -93,7 +98,7 @@
(when tags
(ecukes-print-message
(ansi-cyan
- (s-join " " (--map (s-concat "@" it) tags)))))
+ (s-join " " (-map (lambda (tag) (s-concat "@" tag)) tags)))))
(ecukes-print-message "Scenario: %s" name)))
(defun ecukes-print-step (step status)
View
6 ecukes-run.el
@@ -8,7 +8,9 @@
(defun ecukes-run (feature-files)
"Parse and run FEATURE-FILES if no steps are missing."
(let* ((features
- (--map (ecukes-parse-feature it) feature-files))
+ (-map
+ (lambda (feature-file)
+ (ecukes-parse-feature feature-file)) feature-files))
(steps
(ecukes-feature-steps features))
(steps-missing
@@ -51,7 +53,7 @@
(defun ecukes-run-background-steps (background)
"Run BACKGROUND steps."
(let ((steps (ecukes-background-steps background)))
- (--each steps (ecukes-run-step it))))
+ (-each steps (lambda (step) (ecukes-run-step step)))))
(defun ecukes-run-background (background)
"Run BACKGROUND."
View
5 ecukes-setup.el
@@ -101,8 +101,9 @@
ecukes-tags
(-concat
ecukes-tags
- (--map
- (substring it 1)
+ (-map
+ (lambda (tag)
+ (substring tag 1))
(split-string arg ","))))
(setq is-tag nil)))))))
(setq argv (-difference argv options))))
View
13 ecukes-steps.el
@@ -30,7 +30,9 @@
(defun ecukes-steps-define (regex fn)
"Define step."
- (unless (--any? (equal regex it) ecukes-steps-definitions)
+ (unless (-any?
+ (lambda (step-def)
+ (equal regex step-def)) ecukes-steps-definitions)
(add-to-list
'ecukes-steps-definitions
(make-ecukes-step-def :regex regex :fn fn))))
@@ -48,11 +50,16 @@
(defun ecukes-steps-missing-definition (steps)
"Return from STEPS those who have not been defined."
- (--reject (ecukes-steps-find (ecukes-step-body it)) steps))
+ (-reject
+ (lambda (step)
+ (ecukes-steps-find (ecukes-step-body step))) steps))
(defun ecukes-steps-find (name)
"Find step by name."
- (--first (s-matches? (ecukes-step-def-regex it) name) ecukes-steps-definitions))
+ (-first
+ (lambda (step-def)
+ (s-matches? (ecukes-step-def-regex step-def) name))
+ ecukes-steps-definitions))
(defun ecukes-steps-args (step)
"Return args from step BODY."
View
5 ecukes.el
@@ -19,8 +19,9 @@
(if ask-for-tags
(setq
ecukes-tags
- (--map
- (substring it 1)
+ (-map
+ (lambda (tag)
+ (substring tag 1))
(split-string (read-string "Run tags: ") ","))))
(let ((feature-files
(if (s-matches? "\.feature$" (buffer-file-name))
View
5 test/test-helper.el
@@ -62,7 +62,10 @@
(if background
(ecukes-background-steps background))
(if scenarios
- (-flatten (--map (ecukes-scenario-steps it) scenarios))))))
+ (-flatten
+ (-map
+ (lambda (scenario)
+ (ecukes-scenario-steps scenario)) scenarios))))))
(funcall fn feature intro scenarios background steps)))
(defun with-messages (callback)
Please sign in to comment.
Something went wrong with that request. Please try again.