mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 00:35:50 +00:00
Merge pull request #4326 from dachary/wip-plugin-spec
explain how to run tests for a given plugin
This commit is contained in:
commit
4e4b1cb4a3
@ -118,6 +118,18 @@ RAILS_ENV=test bundle exec rake db:migrate
|
||||
bundle exec rake autospec p l=5
|
||||
```
|
||||
|
||||
When developing a plugin (the *poll* plugin for instance), the following can be used to only run all tests from the *spec* directory:
|
||||
|
||||
```
|
||||
bundle exec rake plugin:spec poll
|
||||
```
|
||||
|
||||
or just a single file with:
|
||||
|
||||
```
|
||||
LOAD_PLUGINS=1 bundle exec rspec plugins/poll/spec/controllers/posts_controller_spec.rb
|
||||
```
|
||||
|
||||
For more insight into testing Discourse, see [this discussion](http://rubyrogues.com/117-rr-discourse-part-2-with-sam-saffron-and-robin-ward/) with the Ruby Rogues.
|
||||
|
||||
### Sending Email
|
||||
|
Loading…
x
Reference in New Issue
Block a user