Permalink
Browse files

More docs.

  • Loading branch information...
1 parent 23bf9dd commit 2c195f0444f788f957e80a89a9d48c8bb5d2f842 Avdi Grimm committed Jul 19, 2010
Showing with 39 additions and 1 deletion.
  1. +29 −0 README.org
  2. +10 −1 Rakefile
View
@@ -29,6 +29,27 @@
puts "Adventure has exited."
#+end_src
+Or, in Cucumber format:
+
+#+BEGIN_SRC
+ Given process activity is logged to "greenletters.log"
+ Given a process "adventure" from command "adventure"
+ Given I reply "no" to output "Would you like instructions?" from process "adventure"
+ Given I reply "yes" to output "Do you really want to quit" from process "adventure"
+ When I execute the process "adventure"
+ Then I should see the following output from process "adventure":
+ """
+ You are standing at the end of a road before a small brick building.
+ Around you is a forest. A small stream flows out of the building and
+ down a gully.
+ """
+ When I enter "east" into process "adventure"
+ Then I should see the following output from process "adventure":
+ """
+ You are inside a building, a well house for a large spring.
+ """
+#+END_SRC
+
* What
Greenletters is a console interaction automation library similar to [[http://directory.fsf.org/project/expect/][GNU
@@ -52,6 +73,14 @@
The advantage of using a PTY is that *any* output - inclding output written to
the console instead of STDOUT/STDERR - will be captured by Greenletters.
+* Cucumber
+ To use the Cucumber steps in your own feature files, put the following in your env.rb:
+
+#+BEGIN_SRC ruby
+require 'greenletters'
+require 'greenletters/cucumber_steps'
+#+END_SRC
+
* LICENSE
(The MIT License)
View
@@ -16,6 +16,15 @@ Bones {
ignore_file '.gitignore'
readme_file 'README.org'
- summary 'A Ruby command-line automation framework a la Expect'
+ summary 'A Ruby console automation framework a la Expect'
+
+ description <<-END
+ Greenletterrs is a console automation framework, similar to the classic
+ utility Expect. You give it a command to execute, and tell it which outputs
+ or events to expect and how to respond to them.
+
+ Greenletters also includes a set of Cucumber steps which simplify the task
+ of spcifying interactive command-line applications.
+ END
}

0 comments on commit 2c195f0

Please sign in to comment.