From f74ca33a32fbf810b377cf480e996fb383d8f400 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 22 Feb 2017 11:25:50 -0600 Subject: Enable Style/ClassCheck --- spec/support/login_helpers.rb | 2 +- spec/support/matchers/access_matchers.rb | 2 +- spec/support/select2_helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb index dd4c7287655..9ffb00be0b8 100644 --- a/spec/support/login_helpers.rb +++ b/spec/support/login_helpers.rb @@ -16,7 +16,7 @@ module LoginHelpers # login_as(user) def login_as(user_or_role) @user = - if user_or_role.kind_of?(User) + if user_or_role.is_a?(User) user_or_role else create(user_or_role) diff --git a/spec/support/matchers/access_matchers.rb b/spec/support/matchers/access_matchers.rb index ceddb656596..7d238850520 100644 --- a/spec/support/matchers/access_matchers.rb +++ b/spec/support/matchers/access_matchers.rb @@ -38,7 +38,7 @@ module AccessMatchers end def description_for(user, type) - if user.kind_of?(User) + if user.is_a?(User) # User#inspect displays too much information for RSpec's descriptions "be #{type} for the specified user" else diff --git a/spec/support/select2_helper.rb b/spec/support/select2_helper.rb index d30cc8ff9f2..0d526045012 100644 --- a/spec/support/select2_helper.rb +++ b/spec/support/select2_helper.rb @@ -12,7 +12,7 @@ module Select2Helper def select2(value, options = {}) - raise ArgumentError, 'options must be a Hash' unless options.kind_of?(Hash) + raise ArgumentError, 'options must be a Hash' unless options.is_a?(Hash) selector = options.fetch(:from) -- cgit v1.2.1