Commit Graph

7 Commits

Author SHA1 Message Date
Erik Ostrom 8ffc2e3b8d Ported the new ActionView::TestCase from 2-3-stable to master [#3260
state:resolved]

The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.

This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.

Additional `master'-only changes: Made the Action Pack Rakefile run the
ActionView::TestCase tests, and made ActionView::Rendering#_render_text
always return a string.

Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-28 13:31:30 -05:00
David Heinemeier Hansson a1fb57aa69 Added :silence option to BenchmarkHelper#benchmark and turned log_level into a hash parameter and deprecated the old use [DHH] 2009-01-01 18:53:16 +01:00
David Heinemeier Hansson d327496ab7 Fixed tests (and the weird assumption that no logger would mean that the code wasnt run) 2008-04-30 15:00:15 -05:00
Joshua Peek 17d4164a16 Introduce ActionView::TestCase for testing view helpers. 2008-04-19 13:08:24 -05:00
Jeremy Kemper 9d755f1983 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper 0eacdcf9a3 Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 07:16:55 +00:00
Jeremy Kemper c9901176be benchmark helper takes an optional log level, defaults to :info. Chose symbols log levels rather than Logger::FOO constants for simplicity. Added benchmark helper test suite.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 19:33:25 +00:00