Permalink
Browse files

Fix "getting started" docs

Invocation examples (provide a working env.rb), and fix references to
port numbers.
  • Loading branch information...
1 parent ed55ba1 commit 147d2172de897e03979a783e049ae90f843b0bb5 @antifuchs committed Oct 13, 2011
Showing with 14 additions and 12 deletions.
  1. +3 −12 README.md
  2. +11 −0 examples/example-env.rb
View
@@ -32,18 +32,9 @@ definitions.
Put a .wire file into your step_definitions dir; I like to name it `features/step_definitions/clucumber.wire`. See [examples/clucumber.wire](//github.com/antifuchs/clucumber/tree/master/examples/clucumber.wire) for one that works for me.
-In your `features/support/env.rb`, you use something like this:
-
- require 'clucumber'
- begin
- ClucumberSubprocess.launch(File.expand_path("../", File.dirname(__FILE__))).listen <<-LISP
- ;; Put code here that loads your application.
- LISP
- rescue PTY::ChildExited
- STDERR.puts(@main_clucumber && @main_clucumber.output)
- end
-
-This will launch a lisp with clucumber loaded (pass :lisp parameter to `ClucumberSubprocess.new` to specify which lisp, it defaults to sbcl), and (if you used the [examples/clucumber.wire](//github.com/antifuchs/clucumber/tree/master/examples/clucumber.wire) file) start listening on port 42428.
+In your `features/support/env.rb`, you use something like [the included example code](//github.com/antifuchs/clucumber/tree/master/examples/example-env.rb).
+
+The code in this file will launch a lisp with clucumber loaded (pass :lisp parameter to `ClucumberSubprocess.new` to specify which lisp, it defaults to sbcl), and (if you used the [examples/clucumber.wire](//github.com/antifuchs/clucumber/tree/master/examples/clucumber.wire) file) start listening on port 42427.
Then, on the command line, you run cucumber:
@@ -0,0 +1,11 @@
+require 'clucumber'
+
+begin
+ @main_clucumber = ClucumberSubprocess.launch(File.expand_path("../", File.dirname(__FILE__)))
+ @main_clucumber.listen <<-LISP
+ ;; Put code here that loads your application.
+ LISP
+rescue PTY::ChildExited
+ STDERR.puts "Clucumber failed to launch:"
+ STDERR.puts(@main_clucumber && @main_clucumber.output)
+end

0 comments on commit 147d217

Please sign in to comment.