Permalink
Browse files

Added cucumber support to test janus.

Just contains a simple feature to run it from the command line for
now. Next steps will be to spin up a web server that can be verified
by the cucumber tests.
  • Loading branch information...
1 parent 440ee9a commit 6e42fb5c740abfbe16bb1dbbfe4dbb74e1138fd4 @gga committed Jan 14, 2012
Showing with 74 additions and 2 deletions.
  1. +2 −0 .rvmrc
  2. +3 −0 Gemfile
  3. +37 −0 Gemfile.lock
  4. +14 −0 Rakefile
  5. +8 −0 features/cli.feature
  6. +3 −0 features/step_definitions/janus_cli_steps.rb
  7. +1 −0 features/support/env.rb
  8. +2 −1 project.clj
  9. +4 −0 src/janus.clj
  10. +0 −1 test/janus/test/core.clj
View
2 .rvmrc
@@ -0,0 +1,2 @@
+rvm_install_on_use_flag=1
+rvm --create use ruby-1.9.3@janus
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem "aruba"
View
@@ -0,0 +1,37 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ aruba (0.4.11)
+ childprocess (>= 0.2.3)
+ cucumber (>= 1.1.1)
+ ffi (>= 1.0.11)
+ rspec (>= 2.7.0)
+ builder (3.0.0)
+ childprocess (0.3.0)
+ ffi (~> 1.0.6)
+ cucumber (1.1.4)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.2)
+ gherkin (~> 2.7.1)
+ json (>= 1.4.6)
+ term-ansicolor (>= 1.0.6)
+ diff-lcs (1.1.3)
+ ffi (1.0.11)
+ gherkin (2.7.3)
+ json (>= 1.4.6)
+ json (1.6.4)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ term-ansicolor (1.0.7)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ aruba
View
@@ -0,0 +1,14 @@
+require 'cucumber'
+require 'cucumber/rake/task'
+
+task :test do
+ sh "lein midje"
+end
+
+task :build do
+ sh "lein uberjar"
+end
+
+Cucumber::Rake::Task.new(:features => :build) do |t|
+ t.cucumber_opts = "features --format pretty"
+end
View
@@ -0,0 +1,8 @@
+Feature: Command line interface
+ In order to discover usage
+ As a developer
+ I want to be able to run janus from the command line
+
+ Scenario: janus should exit when started without args
+ When I run janus
+ Then the exit status should be 0
@@ -0,0 +1,3 @@
+When /^I run janus$/ do
+ step %{I run `java -jar ../../janus-0.0.1-standalone.jar`}
+end
View
@@ -0,0 +1 @@
+require 'aruba/cucumber'
View
@@ -9,4 +9,5 @@
:dev-dependencies [[swank-clojure "1.4.0-SNAPSHOT"]
[clj-http-fake "0.2.3"]
[midje "1.3.1"]
- [lein-midje "1.0.4"]])
+ [lein-midje "1.0.4"]]
+ :main janus)
View
@@ -0,0 +1,4 @@
+(ns janus
+ (:gen-class))
+
+(defn -main [& args])
View
@@ -1,3 +1,2 @@
(ns janus.test.core
- (:use [janus.core])
(:use [clojure.test]))

0 comments on commit 6e42fb5

Please sign in to comment.