view_test is a similar implementation of rspec's controller and view
specs for test/unit.
It allows you to migrate existing tests one test at a time to create
simpler functional tests
by extracting out all of the view assertions into their own view_test.
It allows you to migrate existing tests one test at a time to create
simpler functional tests
by extracting out all of the view assertions into their own view_test.
Check it out athttp://www.continuousthinking.com/tags/view_test
Does it peacefully coexist with form_test_helper?
I'm naturally incapable of excluding pilot error, but I suspect that
ZenTest's ViewTestCase and form_test_helper collude to produce a nasty
error. I will reproduce it on request...
> view_test is a similar implementation of rspec's controller and view
> specs for test/unit.
> It allows you to migrate existing tests one test at a time to create
> simpler functional tests
> by extracting out all of the view assertions into their own view_test.
> Check it out athttp://www.continuousthinking.com/tags/view_test
> The goal of view_test is to allow people who are using test/unit to
> achieve a better level of
> testing.
Have you looked at Test::Rails in ZenTest? I think rSpec got several
of its ideas for view testing from there.
A while back I checked it out, I think I need to give it a better
look.
> It allows you to migrate existing tests one test at a time to create
> simpler functional tests
> by extracting out all of the view assertions into their own view_test.
>
> Check it out athttp://www.continuousthinking.com/tags/view_test
Does it peacefully coexist with form_test_helper?
Here's the ZenTest + form_test_helper code that fails:
submit_form 'host_ring_form' do |post|
assert_equal users(:BunBun).id, post['user[id]'].value.to_i
post['ring_name'] = 'progidy'
end
end
...
The failure message complains about @session being both deprecated and
already set. It appears below my sig.
The only overt @session assignment I can find in our beloved maze of
metaprogrammed Rails code and plugins is up in ZenTest, but if I
change that to 'session' the error persists. I can then add a 'p
@session' to anywhere in my test case, and it returns nil.
> [ANN] view_test 0.9.0
>
> view_test is a similar implementation of rspec's controller and view
> specs for test/unit.
>
> It allows you to migrate existing tests one test at a time to create
> simpler functional tests
> by extracting out all of the view assertions into their own view_test.
>
> Check it out at http://www.continuousthinking.com/tags/view_test
>
> The goal of view_test is to allow people who are using test/unit to
> achieve a better level of
> testing.
Have you looked at Test::Rails in ZenTest? I think rSpec got several
of its ideas for view testing from there.
Eric - it definitely did. Initially RSpec's Rails plugin wrapped
ZenTest, but there were some things that I wanted to do differently so
I took what was needed and broke the dependency. You and Ryan are
credited in the license: http://rspec.rubyforge.org/license.html