test/omniauth/config_test.rb in devise-4.2.0 vs test/omniauth/config_test.rb in devise-4.2.1

- old
+ new

@@ -23,22 +23,24 @@ test "finds contrib strategies" do config = Devise::OmniAuth::Config.new :facebook, [{}] assert_equal OmniAuth::Strategies::Facebook, config.strategy_class end - test "finds the strategy in OmniAuth's list by name" do - NamedTestStrategy = Class.new - NamedTestStrategy.send :include, OmniAuth::Strategy - NamedTestStrategy.option :name, :the_one + class NamedTestStrategy + include OmniAuth::Strategy + option :name, :the_one + end + test "finds the strategy in OmniAuth's list by name" do config = Devise::OmniAuth::Config.new :the_one, [{}] assert_equal NamedTestStrategy, config.strategy_class end - test "finds the strategy in OmniAuth's list by class name" do - UnNamedTestStrategy = Class.new - UnNamedTestStrategy.send :include, OmniAuth::Strategy + class UnNamedTestStrategy + include OmniAuth::Strategy + end + test "finds the strategy in OmniAuth's list by class name" do config = Devise::OmniAuth::Config.new :un_named_test_strategy, [{}] assert_equal UnNamedTestStrategy, config.strategy_class end test 'raises an error if strategy cannot be found' do