small medium large xlarge

10 Apr 2009, 19:10
Richard Fletcher (2 posts)

I just bought the book last weekend and I’m totally impressed. I have a small issue that I’m trying to sort out. On page 206 of the third edition I’m trying to run a simple test. I’m getting the following error. I can’t seem to run any of the test cases. Anyone have any suggestions. Thanks

error message

require_file’: wrong # of arguments(1 for 2) (ArgumentError


require ‘test_helper’

class ProductTest < ActiveSupport::TestCase # Replace this with your real tests. test “the truth” do assert true end end

13 Apr 2009, 15:40
Richard Fletcher (2 posts)

I found out the problem.It looks like there is a new way to define a test. I got all the unit tests to work by changing the test definations. I hope this will help someone in the future.

Old way

test “the truth” do assert true end

New way

def test_the_truth assert true end

You must be logged in to comment