changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/README

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1== RSpec
2
3RSpec is a Behaviour Driven Development framework with tools to express User Stories
4with Executable Scenarios and Executable Examples at the code level.
5
6RSpec ships with several modules:
7
8Spec::Story provides a framework for expressing User Stories
9
10Spec::Example provides a framework for expressing code Examples
11
12Spec::Matchers provides Expression Matchers for use with Spec::Expectations
13and Spec::Mocks.
14
15Spec::Expectations supports setting expectations on your objects so you
16can do things like:
17
18 result.should equal(expected_result)
19
20Spec::Mocks supports creating Mock Objects, Stubs, and adding Mock/Stub
21behaviour to your existing objects.
22
23== Installation
24
25The simplest approach is to install the gem:
26
27 gem install -r rspec #mac users must sudo
28
29== Building the RSpec gem
30If you prefer to build the gem locally, check out source from svn://rubyforge.org/var/svn/rspec/trunk. Then
31do the following:
32
33 rake gem
34 gem install pkg/rspec-0.x.x.gem (you may have to sudo)
35
36== Running RSpec's specs
37In order to run RSpec's full suite of specs (rake pre_commit) you must install the following gems:
38
39* rake # Runs the build script
40* rcov # Verifies that the code is 100% covered by specs
41* webby # Generates the static HTML website
42* syntax # Required to highlight ruby code
43* diff-lcs # Required if you use the --diff switch
44* win32console # Required by the --colour switch if you're on Windows
45* meta_project # Required in order to make releases at RubyForge
46* heckle # Required if you use the --heckle switch
47* hpricot # Used for parsing HTML from the HTML output formatter in RSpec's own specs
48
49Once those are all installed, you should be able to run the suite with the following steps:
50
51* svn co svn://rubyforge.org/var/svn/rspec/trunk rspec
52* cd rspec
53* rake install_dependencies
54* cd example_rails_app
55* export RSPEC_RAILS_VERSION=1.2.3
56* rake rspec:generate_mysql_config
57* mysql -u root < db/mysql_setup.sql
58* cd ..
59* rake pre_commit
60
61Note that RSpec itself - once built - doesn't have any dependencies outside the Ruby core
62and stdlib - with a few exceptions:
63
64* The spec command line uses diff-lcs when --diff is specified.
65* The spec command line uses heckle when --heckle is specified.
66* The Spec::Rake::SpecTask needs RCov if RCov is enabled in the task.
67
68See http://rspec.rubyforge.org for further documentation.
69
70== Contributing
71