Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing unsubscribe from test #1689

Merged
merged 1 commit into from
Apr 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/action_controller/serialization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,15 @@ def use_adapter?
end

def test_render_event_is_emmited
::ActiveSupport::Notifications.subscribe('render.active_model_serializers') do |name|
subscriber = ::ActiveSupport::Notifications.subscribe('render.active_model_serializers') do |name|
@name = name
end

get :render_using_implicit_serializer

assert_equal 'render.active_model_serializers', @name
ensure
ActiveSupport::Notifications.unsubscribe(subscriber) if subscriber
end
end
end
Expand Down