diff --git a/lib/database_cleaner/active_record/base.rb b/lib/database_cleaner/active_record/base.rb index 5464cce8..0c7d4393 100644 --- a/lib/database_cleaner/active_record/base.rb +++ b/lib/database_cleaner/active_record/base.rb @@ -87,7 +87,6 @@ def establish_connection ::ActiveRecord::Base.establish_connection(connection_hash) ::ActiveRecord::Base end - end end end diff --git a/spec/database_cleaner/active_record/base_spec.rb b/spec/database_cleaner/active_record/base_spec.rb index ff5be7f8..e6c15889 100644 --- a/spec/database_cleaner/active_record/base_spec.rb +++ b/spec/database_cleaner/active_record/base_spec.rb @@ -179,7 +179,7 @@ class ExampleStrategy it "establish a connection using ActiveRecord::Base" do ::ActiveRecord::Base.should_receive(:establish_connection).with(hash) - subject.connection_class + expect(subject.connection_class).to eq ::ActiveRecord::Base end end end