Results 1 to 5 of 5
Thread: Unit Testing in Rails
Mar 12, 2009, 18:00 #1
- Join Date
- Apr 2006
- 0 Post(s)
- 0 Thread(s)
Unit Testing in Rails
I've been reading Simply Rails 2 (thanks Sitepoint for having a PDF version!).
I noticed that what it says is the default unit test for a model in story_test.rb is different from what I had. It said it would be something like:
require File.dirname(__FILE__) + '/../test_helper' class StoryTest < ActiveSupport::TestCase def test_for_truth assert true end end
require 'test_helper' class StoryTest < ActiveSupport::TestCase test "for truth" do assert true end end
Everything the book says works, though I have changed all of the methods to the blocks instead, but I don't know if anything else is outdated.