Skip to content

Commit

Permalink
Moved RSpec notes under "Up and Running".
Browse files Browse the repository at this point in the history
  • Loading branch information
ubermajestix committed Dec 7, 2011
1 parent d947247 commit 358e939
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Readme.markdown
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 358e939

Please sign in to comment.