Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## test_helper.rb
- require 'rubygems'
- require 'sinatra'
- require 'test/unit'
- require 'shoulda'
- require 'matchy'
- File.expand_path File.dirname __FILE__ + '/../application'
- ## test_application.rb
- require 'test_helper'
- class TestIndex < Test::Unit::TestCase
- context 'The index page' do
- setup do
- get '/'
- @article = Article.first
- end
- should 'show the most recent article' do
- assert_equal 'Jack Knife you sonofa bitch!', @article.title
- end
- end
- end
Add Comment
Please, Sign In to add comment