Moved RSpec notes under "Up and Running".

This commit is contained in:
Tyler Montgomery 2011-12-07 16:09:25 -07:00
parent d947247197
commit 358e93953c
1 changed files with 7 additions and 8 deletions

View File

@ -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