Permalink
Browse files

update docs

  • Loading branch information...
1 parent 71cb7af commit e58c0a3e0ff700481d9850a64061b7991bb11a96 @dchelimsky dchelimsky committed May 8, 2011
Showing with 31 additions and 9 deletions.
  1. +9 −9 features/.nav
  2. +22 −0 features/command_line/README.md
View
18 features/.nav
@@ -5,6 +5,15 @@
- basic_structure.feature
- shared_example_group.feature
- shared_context.feature
+- command_line:
+ - configure.feature
+ - example_name_option.feature
+ - format_option.feature
+ - line_number_option.feature
+ - tag.feature
+ - line_number_appended_to_path.feature
+ - exit_status.feature
+ - rake_task.feature
- pending:
- pending_examples.feature
- hooks:
@@ -29,15 +38,6 @@
- exclusion_filters.feature
- if_and_unless.feature
- run_all_when_everything_filtered.feature
-- command_line:
- - configure.feature
- - example_name_option.feature
- - format_option.feature
- - line_number_option.feature
- - tag.feature
- - line_number_appended_to_path.feature
- - exit_status.feature
- - rake_task.feature
- configuration:
- read_options_from_file.feature
- fail_fast.feature
View
22 features/command_line/README.md
@@ -4,3 +4,25 @@ behavior, including output formats, filtering examples, etc.
For a full list of options, run the `rspec` command with the `--help` flag:
$ rspec --help
+
+### Run with `ruby`
+
+Generally, life is simpler if you just use the `rspec` command. If you must use the `ruby`
+command, however, you'll want to do the following:
+
+* `require 'rspec/autorun'`
+
+This tells RSpec to run your examples. Do this in any file that you are
+passing to the `ruby` command.
+
+* Update the `LOAD_PATH`
+
+It is conventional to put configuration in and require assorted support files
+from `spec/spec_helper.rb`. It is also conventional to require that file from
+the spec files using `require 'spec_helper'`. This works because RSpec
+implicitly adds the `spec` directory to the `LOAD_PATH`. It also adds `lib`, so
+your implementation files will be on the `LOAD_PATH` as well.
+
+If you're using the `ruby` command, you'll need to do this yourself:
+
+ ruby -Ilib -Ispec path/to/spec.rb

0 comments on commit e58c0a3

Please sign in to comment.