Hi,
Im currently writing unit tests for a fairly simple application and Im
using mysql with RoR.
When i have the following test:
def test_create
assert_equal 1, @result.id
assert_equal ‘henry-test’, @result.module_name
assert_equal “11:24”, @result.build_status_since
assert_equal ‘10:00’, @result.last_failure
assert_equal ‘11:20’, @result.last_success
assert_equal ‘b.12’, @result.build_number
assert_equal ‘http://127.0.0.1:3000/test.html’, @result.build_url
assert_equal ‘Tue Nov 28 11:45:36 GMT Standard Time 2006’,
@result.last_check
end
which is for the standard create action in rails scaffold i get the
following error:
- Failure:
test_create(ResultTest) [./test/unit/result_test.rb:19]:
<“Tue Nov 28 11:45:36 GMT Standard Time 2006”> expected but was
<Tue Nov 28 11:45:36 GMT Standard Time 2006>.
the data matches up but it fails the test? does anyone know why this is
happening?
If it matters im loading in the db using fixtures. see below:
first:
id: 1
module_name: henry-test
build_status_since: ‘11:24’
last_failure: ‘10:00’
last_success: ‘11:20’
build_number: ‘b.12’
build_url: ‘http://127.0.0.1:3000/test.html’
last_check: “2006-11-28 11:45:36”
cheers,
Chris