From 6cec2861fd5e472b97fc715292b095cd9384769f Mon Sep 17 00:00:00 2001 From: Faustino Aguilar Date: Thu, 21 Jun 2018 02:24:59 -0500 Subject: [PATCH] [Cleanup] Removes unnecessary code from spec helper (#29) --- basic/crecto/app/spec/spec_helper.cr | 27 --------------------- basic/granite/app/spec/spec_helper.cr | 28 ++-------------------- default/app/spec/spec_helper.cr | 27 --------------------- misc/modular/app/spec/spec_helper.cr | 27 --------------------- react/preact_redux/app/spec/spec_helper.cr | 27 --------------------- 5 files changed, 2 insertions(+), 134 deletions(-) diff --git a/basic/crecto/app/spec/spec_helper.cr b/basic/crecto/app/spec/spec_helper.cr index 33aa94d..6f222aa 100644 --- a/basic/crecto/app/spec/spec_helper.cr +++ b/basic/crecto/app/spec/spec_helper.cr @@ -10,30 +10,3 @@ Micrate::DB.connection_url = Amber.settings.database_url # Automatically run migrations on the test database Micrate::Cli.run_up - -module Spec - DRIVER = :chrome - PATH = "/usr/local/bin/chromedriver" - - # Not all server implementations will support every WebDriver feature. - # Therefore, the client and server should use JSON objects with the properties - # listed below when describing which features a session supports. - capabilities = { - browserName: "chrome", - version: "", - platform: "ANY", - javascriptEnabled: true, - takesScreenshot: true, - handlesAlerts: true, - databaseEnabled: true, - locationContextEnabled: true, - applicationCacheEnabled: true, - browserConnectionEnabled: true, - cssSelectorsEnabled: true, - webStorageEnabled: true, - rotatable: true, - acceptSslCerts: true, - nativeEvents: true, - args: "--headless", - } -end diff --git a/basic/granite/app/spec/spec_helper.cr b/basic/granite/app/spec/spec_helper.cr index 33aa94d..3560d95 100644 --- a/basic/granite/app/spec/spec_helper.cr +++ b/basic/granite/app/spec/spec_helper.cr @@ -11,29 +11,5 @@ Micrate::DB.connection_url = Amber.settings.database_url # Automatically run migrations on the test database Micrate::Cli.run_up -module Spec - DRIVER = :chrome - PATH = "/usr/local/bin/chromedriver" - - # Not all server implementations will support every WebDriver feature. - # Therefore, the client and server should use JSON objects with the properties - # listed below when describing which features a session supports. - capabilities = { - browserName: "chrome", - version: "", - platform: "ANY", - javascriptEnabled: true, - takesScreenshot: true, - handlesAlerts: true, - databaseEnabled: true, - locationContextEnabled: true, - applicationCacheEnabled: true, - browserConnectionEnabled: true, - cssSelectorsEnabled: true, - webStorageEnabled: true, - rotatable: true, - acceptSslCerts: true, - nativeEvents: true, - args: "--headless", - } -end +# Disable Granite logs in tests +Granite.settings.logger = Logger.new nil diff --git a/default/app/spec/spec_helper.cr b/default/app/spec/spec_helper.cr index 33aa94d..6f222aa 100644 --- a/default/app/spec/spec_helper.cr +++ b/default/app/spec/spec_helper.cr @@ -10,30 +10,3 @@ Micrate::DB.connection_url = Amber.settings.database_url # Automatically run migrations on the test database Micrate::Cli.run_up - -module Spec - DRIVER = :chrome - PATH = "/usr/local/bin/chromedriver" - - # Not all server implementations will support every WebDriver feature. - # Therefore, the client and server should use JSON objects with the properties - # listed below when describing which features a session supports. - capabilities = { - browserName: "chrome", - version: "", - platform: "ANY", - javascriptEnabled: true, - takesScreenshot: true, - handlesAlerts: true, - databaseEnabled: true, - locationContextEnabled: true, - applicationCacheEnabled: true, - browserConnectionEnabled: true, - cssSelectorsEnabled: true, - webStorageEnabled: true, - rotatable: true, - acceptSslCerts: true, - nativeEvents: true, - args: "--headless", - } -end diff --git a/misc/modular/app/spec/spec_helper.cr b/misc/modular/app/spec/spec_helper.cr index 33aa94d..6f222aa 100644 --- a/misc/modular/app/spec/spec_helper.cr +++ b/misc/modular/app/spec/spec_helper.cr @@ -10,30 +10,3 @@ Micrate::DB.connection_url = Amber.settings.database_url # Automatically run migrations on the test database Micrate::Cli.run_up - -module Spec - DRIVER = :chrome - PATH = "/usr/local/bin/chromedriver" - - # Not all server implementations will support every WebDriver feature. - # Therefore, the client and server should use JSON objects with the properties - # listed below when describing which features a session supports. - capabilities = { - browserName: "chrome", - version: "", - platform: "ANY", - javascriptEnabled: true, - takesScreenshot: true, - handlesAlerts: true, - databaseEnabled: true, - locationContextEnabled: true, - applicationCacheEnabled: true, - browserConnectionEnabled: true, - cssSelectorsEnabled: true, - webStorageEnabled: true, - rotatable: true, - acceptSslCerts: true, - nativeEvents: true, - args: "--headless", - } -end diff --git a/react/preact_redux/app/spec/spec_helper.cr b/react/preact_redux/app/spec/spec_helper.cr index 33aa94d..6f222aa 100644 --- a/react/preact_redux/app/spec/spec_helper.cr +++ b/react/preact_redux/app/spec/spec_helper.cr @@ -10,30 +10,3 @@ Micrate::DB.connection_url = Amber.settings.database_url # Automatically run migrations on the test database Micrate::Cli.run_up - -module Spec - DRIVER = :chrome - PATH = "/usr/local/bin/chromedriver" - - # Not all server implementations will support every WebDriver feature. - # Therefore, the client and server should use JSON objects with the properties - # listed below when describing which features a session supports. - capabilities = { - browserName: "chrome", - version: "", - platform: "ANY", - javascriptEnabled: true, - takesScreenshot: true, - handlesAlerts: true, - databaseEnabled: true, - locationContextEnabled: true, - applicationCacheEnabled: true, - browserConnectionEnabled: true, - cssSelectorsEnabled: true, - webStorageEnabled: true, - rotatable: true, - acceptSslCerts: true, - nativeEvents: true, - args: "--headless", - } -end