Skip to content
Newer
Older
100644 71 lines (47 sloc) 2.2 KB
4326a3d @sikachu Update documentation regarding running test
sikachu authored Apr 25, 2012
1 Contributing
2 ============
3
6311a68 @mike-burns Add a document describing how to contribute.
mike-burns authored Jul 22, 2011
4 We love pull requests. Here's a quick guide:
5
6 1. Fork the repo.
7
8 2. Run the tests. We only take pull requests with passing tests, and it's great
9 to know that you have a clean slate: `bundle && rake`
10
11 3. Add a test for your change. Only refactoring and documentation changes
12 require no new tests. If you are adding functionality or fixing a bug, we need
13 a test!
14
15 4. Make the test pass.
16
17 5. Push to your fork and submit a pull request.
18
19 At this point you're waiting on us. We like to at least comment on, if not
20 accept, pull requests within three business days (and, typically, one business
21 day). We may suggest some changes or improvements or alternatives.
22
23 Some things that will increase the chance that your pull request is accepted,
24 taken straight from the Ruby on Rails guide:
25
26 * Use Rails idioms and helpers
27 * Include tests that fail without your code, and pass with it
28 * Update the documentation, the surrounding one, examples elsewhere, guides,
29 whatever is affected by your contribution
30
4326a3d @sikachu Update documentation regarding running test
sikachu authored Apr 25, 2012
31 Running Tests
32 -------------
33
34 Paperclip uses [Appraisal](https://github.com/thoughtbot/appraisal) to aid
35 testing against multiple version of Ruby on Rails. This helps us to make sure
36 that Paperclip performs correctly with them.
37
38 ### Bootstrapping your test suite:
39
40 bundle install
41 bundle exec rake appraisal:install
42
43 This will install all the required gems that requires to test against each
44 version of Rails, which defined in `gemfiles/*.gemfile`.
45
46 ### To run a full test suite:
47
48 bundle exec rake
49
50 This will run Test::Unit and Cucumber against all version of Rails
51
52 ### To run single Test::Unit or Cucumber test
53
54 You need to specify a `BUNDLE_GEMFILE` pointing to the gemfile before running
55 the normal test command:
56
57 BUNDLE_GEMFILE=gemfiles/3.2.gemfile ruby -Itest test/schema_test.rb
58 BUNDLE_GEMFILE=gemfiles/3.2.gemfile cucumber features/basic_integration.feature
59
60 Syntax
61 ------
6311a68 @mike-burns Add a document describing how to contribute.
mike-burns authored Jul 22, 2011
62
63 * Two spaces, no tabs.
64 * No trailing whitespace. Blank lines should not have any space.
65 * Prefer &&/|| over and/or.
66 * MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
67 * a = b and not a=b.
68 * Follow the conventions you see used in the source already.
69
70 And in case we didn't emphasize it enough: we love tests!
Something went wrong with that request. Please try again.