I am messing around with RESTful controller using edge rails (revision
5222) and am having the following problem. I have changed the function
that is failing by adding the client name in the flasg but that it is
and I haven’t changed the test code either but I am getting this error.
The fact that “Expected” is empty makes me wonder if it is a bug in edge
rails?
—Failure message—
Failure:
test_should_create_client(ClientsControllerTest)
[./test/functional/clients_controller_test.rb:30]:
<3> expected but was
<2>.
I am messing around with RESTful controller using edge rails (revision
5222) and am having the following problem. I have changed the function
that is failing by adding the client name in the flasg but that it is
and I haven’t changed the test code either but I am getting this error.
The fact that “Expected” is empty makes me wonder if it is a bug in edge
rails?
Its not empty, it’s 3
If you take out the assert_equal, does the assert_redirectd_to work ?
I am messing around with RESTful controller using edge rails (revision
5222) and am having the following problem. I have changed the function
that is failing by adding the client name in the flasg but that it is
and I haven’t changed the test code either but I am getting this error.
The fact that “Expected” is empty makes me wonder if it is a bug in edge
rails?
Its not empty, it’s 3
If you take out the assert_equal, does the assert_redirectd_to work ?
A>
Aaaah I thought that was some sort of line numbering. I thought the
messages were “Expected FOO but was BAR”. Not “FOO expected but was
BAR”…
If you comment out the assert_equal, and let the assert_redirected_to
have a go, you’ll be able to see if the controller method succeeds.
I think there must also be a way to assert the contents of the flash,
which you can try as long as you comment out the assert_equal(which
stops the test in its tracks)
Alan
Whoops, that was me thinking to myself with my fingers, wasn’t actually
looking for an answer
Aaaah I thought that was some sort of line numbering. I thought the
messages were “Expected FOO but was BAR”. Not “FOO expected but was
BAR”…
Crawls back into the corner.
Ok, so why isn’t it registering the new client
If you comment out the assert_equal, and let the assert_redirected_to
have a go, you’ll be able to see if the controller method succeeds.
I think there must also be a way to assert the contents of the flash,
which you can try as long as you comment out the assert_equal(which
stops the test in its tracks)
Alan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.