/ Published in: Rails
This is the code I use when I want to test a helper. It uses Factory Girl and Shoulda, but they're not needed to make it work.
- require File.dirname(__FILE__) + '/../test_helper'
- require 'action_view/test_case'
- class MyHelperTest < ActionView::TestCase
- include MyHelper
- context 'a helper in some context' do
- setup do
- should 'assert this test' do
You need to login to post a comment.