mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Moved RSpec notes under "Up and Running".
This commit is contained in:
parent
d947247197
commit
358e93953c
1 changed files with 7 additions and 8 deletions
|
@ -247,6 +247,13 @@ class ActicleMailer < ActionMailer::Base
|
|||
end
|
||||
end
|
||||
```
|
||||
### Integration with RSpec
|
||||
|
||||
Using the provided generator, Draper will place specs for your new decorator in `spec/decorators/`.
|
||||
By default, specs in `spec/decorators` will be tagged as `type => :decorator`. Any spec tagged as `decorator`
|
||||
will run `ApplicationController.new.set_current_view_context` which makes helpers available to the decorator.
|
||||
|
||||
Note: If you're using Spork, you need to `require 'draper/rspec_integration'` in your Spork.prefork block.
|
||||
|
||||
## Possible Decoration Methods
|
||||
|
||||
|
@ -318,14 +325,6 @@ class ArticleDecorator < ApplicationDecorator
|
|||
end
|
||||
end
|
||||
```
|
||||
### Integration with RSpec
|
||||
|
||||
Using the provided generator, Draper will place specs for your new decorator in `spec/decorators/`.
|
||||
By default, specs in `spec/decorators` will be tagged as `type => :decorator`. Any spec tagged as `decorator`
|
||||
will run `ApplicationController.new.set_current_view_context` which makes helpers available to the decorator.
|
||||
|
||||
Note: If you're using Spork, you need to `require 'draper/rspec_integration'` in your Spork.prefork block.
|
||||
|
||||
## Issues / Pending
|
||||
|
||||
* Documentation
|
||||
|
|
Loading…
Reference in a new issue