Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 135 lines (91 sloc) 4.721 kB
7dd4146 @dchelimsky much simpler setup
dchelimsky authored
1 # Rspec 2 Development
0f56c24 @spicycode Adding basic instructions to the readme
spicycode authored
2
0b580f2 @dchelimsky words
dchelimsky authored
3 This repository is for anyone interested in contributing to rspec-2 or
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
4 rspec-rails-2.
7dd4146 @dchelimsky much simpler setup
dchelimsky authored
5
6 ## Setting up the environment
7
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
8 ### System pre-reqs:
cc315c1 @dchelimsky more word about setup
dchelimsky authored
9
10 git
ef8e881 @dchelimsky update readme
dchelimsky authored
11 sqlite3 # for rspec-rails
cc315c1 @dchelimsky more word about setup
dchelimsky authored
12
ef8e881 @dchelimsky update readme
dchelimsky authored
13 ### Environment
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
14
12949ac @dchelimsky words
dchelimsky authored
15 The safest bet is to use rvm with an rvm installed ruby (not system ruby) and
16 a clean gemset dedicated to rspec-dev:
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
17
ca07953 @rosenfeld Simplifies procedure for setting a rspec-dev environment
rosenfeld authored
18 rvm 1.9.2@rspec-dev --create # or whatever version of Ruby you prefer
12949ac @dchelimsky words
dchelimsky authored
19
20 Windows users can use pik instead of rvm.
21
22 If you use a different Ruby version manager (or none at all), the important
23 thing is that you have a sandboxed gem environment that does not require you to
24 use sudo to install gems, and has no rspec libraries installed.
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
25
26 ### required gems
27
ef8e881 @dchelimsky update readme
dchelimsky authored
28 You just need to install bundler to start:
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
29
ef8e881 @dchelimsky update readme
dchelimsky authored
30 gem install bundler
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
31
dab8e41 @wincent README: help with updating RubyGems to satisfy Bundler
wincent authored
32 Bundler will only install if you have RubyGems 1.3.6 or later, so you may need
33 to update RubyGems first:
34
35 gem update --system
36
ef8e881 @dchelimsky update readme
dchelimsky authored
37 ### Once bundler installed
78e0925 @dchelimsky updated dev environment relies on bundler
dchelimsky authored
38
39 Once you have all the pre-reqs listed above, here's all you need to do
40 to set up your environment:
7dd4146 @dchelimsky much simpler setup
dchelimsky authored
41
17cca71 @dchelimsky words
dchelimsky authored
42 git clone git://github.com/rspec/rspec-dev.git
43 cd rspec-dev
7c19b55 @dchelimsky --binstubs
dchelimsky authored
44 bundle install --binstubs
ef8e881 @dchelimsky update readme
dchelimsky authored
45 bin/rake setup
46 bin/rake
0f56c24 @spicycode Adding basic instructions to the readme
spicycode authored
47
0b580f2 @dchelimsky words
dchelimsky authored
48 If all goes well, you'll end up seeing a lot of passing cucumber features
49 and rspec code examples. You'll also have a directory structure that looks
50 like this:
51
52 rspec-dev
53 repos
54 rspec-core # rspec runner, describe, it, etc
55 rspec-expectations # should, should_not + matchers
56 rspec-mocks # doubles, mocks, stubs, fakes, etc
57 rspec-rails # rspec 2 for rails 3
58 tmp
cc315c1 @dchelimsky more word about setup
dchelimsky authored
59 aruba # gets generated when running rspec-rails' cukes
0b580f2 @dchelimsky words
dchelimsky authored
60 example_app # gets generated when running rspec-rails' specs
61 rspec # meta-gem that depends on core, expectations, and mocks
62
63 After the initial clone you can run `rake git:pull` from the rspec-dev
64 directory to update all of the rspec repos (in repos).
fb619a4 @spicycode Updating the readme and adding a gemcutter task
spicycode authored
65
17cca71 @dchelimsky words
dchelimsky authored
66 Run `rake -T` to see the available tasks for dev mode.
9cea449 @dchelimsky words
dchelimsky authored
67
0b580f2 @dchelimsky words
dchelimsky authored
68 # Contributing
69
70 Once you've set up the environment, you'll need to cd into the working
71 directory of whichever repo you want to work in. From there you can run the
72 specs and cucumber features, and make patches.
73
74 ## Patches
75
6c0ec45 @dchelimsky update README
dchelimsky authored
76 Please submit a pull request or a github issue to one of the issue trackers
77 listed below. If you submit an issue, please include a link to either of:
ef9309a @dchelimsky update README section on patches
dchelimsky authored
78
79 * a gist (or equivalent) of the patch
80 * a branch or commit in your github fork of the repo
81
0b580f2 @dchelimsky words
dchelimsky authored
82 ## Issues
83
ef8e881 @dchelimsky update readme
dchelimsky authored
84 * [https://github.com/rspec/rspec-core/issues](https://github.com/rspec/rspec-core/issues)
85 * [https://github.com/rspec/rspec-dev/issues](https://github.com/rspec/rspec-dev/issues)
86 * [https://github.com/rspec/rspec-expectations/issues](https://github.com/rspec/rspec-expectations/issues)
87 * [https://github.com/rspec/rspec-mocks/issues](https://github.com/rspec/rspec-mocks/issues)
88 * [https://github.com/rspec/rspec-rails/issues](https://github.com/rspec/rspec-rails/issues)
0b580f2 @dchelimsky words
dchelimsky authored
89
90 # Troubleshooting the environment
df720ba @dchelimsky words
dchelimsky authored
91
0b580f2 @dchelimsky words
dchelimsky authored
92 ## Load path and rubygems
93
94 Not everybody uses rubygems as their package management system. If this
95 sounds odd to you, read http://gist.github.com/54177.
96
69b9ce9 @wincent README: update "Load path" section
wincent authored
97 In light of this fact, these repositories are "require 'rubygems'" free. The
98 included Rakefiles use Bundler, which effectively manages all of this for
99 you.
100
101 If you're using any of these repos in isolation and without Bundler, however,
102 you may need to do one of the following:
df720ba @dchelimsky words
dchelimsky authored
103
104 export RUBYOPT=rubygems
105 set RUBYOPT=rubygems
106
0b580f2 @dchelimsky words
dchelimsky authored
107 For those of you who prefer not to add this to your primary environment, there
108 are plenty of solutions available to your managing multiple ruby environments.
109
110 ## no such file to load -- spec_helper (LoadError)
111
112 Rspec adds ./lib and ./spec to the load path, so you have to run the `rspec`
113 command from the root of the repository you're working on. i.e. if you're
114 working on rspec-core, cd to the rspec-core directory. Don't try to run specs
115 from the rspec-dev directory, or you'll see `LoadError`s.
116
117 ## different problem?
118
119 If you run into a problem not documented here, please check the rspec-dev
120 issues tracker to see if someone else has already reported it. If not, please
121 add one.
122
123 ## solution to a problem not documented here?
124
125 If you solve a problem that is not documented here, please share the love
126 by submitting a patch to this README.
127
df720ba @dchelimsky words
dchelimsky authored
128 # Also see
129
9cea449 @dchelimsky words
dchelimsky authored
130 * [http://github.com/rspec/rspec](http://github.com/rspec/rspec)
131 * [http://github.com/rspec/rspec-core](http://github.com/rspec/rspec-core)
132 * [http://github.com/rspec/rspec-expectations](http://github.com/rspec/rspec-expectations)
133 * [http://github.com/rspec/rspec-mocks](http://github.com/rspec/rspec-mocks)
0b580f2 @dchelimsky words
dchelimsky authored
134 * [http://github.com/rspec/rspec-rails](http://github.com/rspec/rspec-rails)
Something went wrong with that request. Please try again.