search for: customertest

Displaying 2 results from an estimated 2 matches for "customertest".

Did you mean: customer_test
2006 Aug 11
5
Unit tests - NilClass problem
...Yesterday I started to write my unit tests for the fist time using rails. I''m using this method: http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/ My customer_test.rb looks like this: require File.dirname(__FILE__) + ''/../test_helper'' class CustomerTest < Test::Unit::TestCase fixtures :customers # Replace this with your real tests. def test_create test_creation_of :model => Customer, :record => @customer, :fixture => @first, :attributes => [:id, :name, :contact_firs...
2006 Jul 02
2
NoMethodError in Unit Test - Rails Newcomer
...; ActiveRecord::Base ... def self.password=(pass) @password=pass salt = Customer.random_string(10) if !salt? self.hashed_password = Customer.encrypt_password(@password, salt) end end Test: customer_test.rb require File.dirname(__FILE__) + ''/../test_helper'' class CustomerTest < Test::Unit::TestCase self.use_instantiated_fixtures = true fixtures :customers ... # change password @longbob.password = @longbob.password_confirmation = "newlongpassword" assert @longbob.save c = Customer.new c.email_address = "jimbo@mcjim.com" # ok c....