Flowdock

Notes posted by eloyesp

RSS feed
May 23, 2013 - (v3.0.0 - v3.2.13)
0 thanks

Use @output_buffer to set the context.

You can use assert_select to test helpers, just have to set the @output_buffer before you do.

Code example

class CurrencyHelperTest < ActionView::TestCase

  setup do
    # can use helper methods here
    @output_buffer = currency 54.78
  end

  test 'currency use a div' do
    asert_select 'div'
  end

end