Sha256: 9230b961478b08c32eb9925ed84a1305b27e3b3933e5538366f4c8fc7faceb8c

Contents?: true

Size: 650 Bytes

Versions: 1

Compression:

Stored size: 650 Bytes

Contents

require "helper"

class ViewInstrumentationTest < ActionController::TestCase
  tests PostsController

  setup :setup_subscriber
  teardown :teardown_subscriber

  def setup_subscriber
    @subscriber = Nunes::Subscribers::ActionView.subscribe(adapter)
  end

  def teardown_subscriber
    ActiveSupport::Notifications.unsubscribe @subscriber if @subscriber
  end

  test "render_template" do
    get :index

    assert_response :success
    assert_timer "action_view.app.views.posts.index.html.erb"
  end

  test "render_partial" do
    get :index

    assert_response :success
    assert_timer "action_view.app.views.posts._post.html.erb"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nunes-0.1.0 test/view_instrumentation_test.rb