diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-01-14 10:24:43 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-01-14 10:24:43 -0700 |
commit | bf095770e561c51cebeb5a556afc03a21d9e603c (patch) | |
tree | 27d13bf00a168aea8663eb151096c4a9bbe79eb7 /actionpack/test | |
parent | 0246712bc15201ea1e8285af5adc5b2620538b5d (diff) | |
download | rails-bf095770e561c51cebeb5a556afc03a21d9e603c.tar.gz rails-bf095770e561c51cebeb5a556afc03a21d9e603c.tar.bz2 rails-bf095770e561c51cebeb5a556afc03a21d9e603c.zip |
Revert benchmark helper regression. Use a #capture within a #benchmark
block. Breaks benchmark calls that return non-String values otherwise.
Revert "add benchmark helper that works in erb"
This reverts commit 904e544cc8f5846de7c31827bb5556c6a238c0de.
Conflicts:
actionpack/lib/action_view/helpers.rb
actionpack/lib/action_view/helpers/benchmark_helper.rb
actionpack/test/template/benchmark_helper_test.rb
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/benchmark_helper_test.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/actionpack/test/template/benchmark_helper_test.rb b/actionpack/test/template/benchmark_helper_test.rb deleted file mode 100644 index 8c198d2562..0000000000 --- a/actionpack/test/template/benchmark_helper_test.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'abstract_unit' -require 'stringio' - -class BenchmarkHelperTest < ActionView::TestCase - include RenderERBUtils - tests ActionView::Helpers::BenchmarkHelper - - def test_output_in_erb - output = render_erb("Hello <%= benchmark do %>world<% end %>") - expected = 'Hello world' - assert_equal expected, output - end - - def test_returns_value_from_block - assert_equal 'test', benchmark { 'test' } - end - - def test_default_message - log = StringIO.new - self.stubs(:logger).returns(Logger.new(log)) - benchmark {} - assert_match(/Benchmarking \(\d+.\d+ms\)/, log.rewind && log.read) - end -end |