diff --git a/examples/clojure_cukes/README.md b/examples/clojure_cukes/README.md index d2e643b510..0fc90d77ca 100644 --- a/examples/clojure_cukes/README.md +++ b/examples/clojure_cukes/README.md @@ -1,8 +1,8 @@ # clojure-cukes -Just a little example illustrating how to use Cucumber with Clojure and Leiningen. -If someone with more Clojure knowledge can improve this it would be great. +Just a little example illustrating how to use Cucumber with Clojure and Leiningen. Please note that the example uses https://github.com/nilswloka/lein-cucumber, which requires Leiningen 2. ## Running cukes - lein test \ No newline at end of file +lein2 deps +lein2 cucumber diff --git a/examples/clojure_cukes/project.clj b/examples/clojure_cukes/project.clj index ce41aa1d4b..c5972e71ec 100644 --- a/examples/clojure_cukes/project.clj +++ b/examples/clojure_cukes/project.clj @@ -1,4 +1,5 @@ -(defproject clojure_cukes "1.0.0.RC2-SNAPSHOT" +(defproject clojure_cukes "1.0.5-SNAPSHOT" :description "A demo of Cucumber with Clojure and Leiningen" - :dependencies [[org.clojure/clojure "1.4.0-alpha3"] - [info.cukes/cucumber-clojure "1.0.0.RC2-SNAPSHOT"]]) + :dependencies [[org.clojure/clojure "1.4.0-alpha3"]] + :plugins [[lein-cucumber "1.0.0"]] + :cucumber-feature-paths ["test/features/"]) diff --git a/examples/clojure_cukes/test/features/step_definitions/cuke_steps.clj b/examples/clojure_cukes/test/features/step_definitions/cuke_steps.clj index 28ec7699d2..805c06cf02 100644 --- a/examples/clojure_cukes/test/features/step_definitions/cuke_steps.clj +++ b/examples/clojure_cukes/test/features/step_definitions/cuke_steps.clj @@ -1,14 +1,11 @@ (use 'clojure-cukes.core) (use 'clojure.test) -(Given #"^I have (\d+) big \"([^\"]*)\" in my belly$" - (fn [n, thing] - (reset! belly (repeat (read-string n) thing)))) +(Given #"^I have (\d+) big \"([^\"]*)\" in my belly$" [n, thing] + (reset! belly (repeat (read-string n) thing))) -(When #"I eat (\d+) \"([^\"]*)\"" - (fn [n, thing] - (eat (repeat (read-string n) thing)))) +(When #"I eat (\d+) \"([^\"]*)\"" [n, thing] + (eat (repeat (read-string n) thing))) -(Then #"^I am \"([^\"]*)\"$" - (fn [mood-name] - (assert (= (name (mood)) mood-name)))) +(Then #"^I am \"([^\"]*)\"$" [mood-name] + (assert (= (name (mood)) mood-name)))