From 358e93953c82c5206537aadbd62e5f4c5802c224 Mon Sep 17 00:00:00 2001 From: Tyler Montgomery Date: Wed, 7 Dec 2011 16:09:25 -0700 Subject: [PATCH] Moved RSpec notes under "Up and Running". --- Readme.markdown | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Readme.markdown b/Readme.markdown index e6d4bc1..8814f36 100644 --- a/Readme.markdown +++ b/Readme.markdown @@ -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