@@ -14,11 +14,33 @@ Note: `db:setup` calls `db:seed` but this does nothing.
14
14
15
15
## Run tests
16
16
17
- This runs all test suites present in GitLab.
17
+ In order to run the test you can use the following commands:
18
+ - ` rake spinach ` to run the spinach suite
19
+ - ` rake spec ` to run the rspec suite
20
+ - ` rake teaspoon ` to run the teaspoon test suite
21
+ - ` rake gitlab:test ` to run all the tests
18
22
19
- ```
20
- bundle exec rake test
21
- ```
23
+ Note: Both ` rake spinach ` and ` rake spec ` takes significant time to pass.
24
+ Instead of running full test suite locally you can save a lot of time by running
25
+ a single test or directory related to your changes. After you submit merge request
26
+ CI will run full test suite for you. Green CI status in the merge request means
27
+ full test suite is passed.
28
+
29
+ Note: You can't run ` rspec . ` since this will try to run all the ` _spec.rb `
30
+ files it can find, also the ones in ` /tmp `
31
+
32
+ To run a single test file you can use:
33
+
34
+ - ` bundle exec rspec spec/controllers/commit_controller_spec.rb ` for a rspec test
35
+ - ` bundle exec spinach features/project/issues/milestones.feature ` for a spinach test
36
+
37
+ To run several tests inside one directory:
38
+
39
+ - ` bundle exec rspec spec/requests/api/ ` for the rspec tests if you want to test API only
40
+ - ` bundle exec spinach features/profile/ ` for the spinach tests if you want to test only profile pages
41
+
42
+ If you want to use [ Spring] ( https://github.com/rails/spring ) set
43
+ ` ENABLE_SPRING=1 ` in your environment.
22
44
23
45
## Generate searchable docs for source code
24
46
0 commit comments