spec: when using test-queue, don't truncate tables in main process
we're going to do it again after fork anyway, so it's redundant Change-Id: Iede3160a8daf63869a42505bbec0496c12336912 Reviewed-on: https://gerrit.instructure.com/100875 Tested-by: Jenkins Reviewed-by: Landon Wilkins <lwilkins@instructure.com> Product-Review: Landon Wilkins <lwilkins@instructure.com> QA-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
parent
c9bd5c7d3b
commit
cf87cc08b8
|
@ -52,6 +52,7 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||||
# and then ensure people aren't creating records outside the rspec
|
# and then ensure people aren't creating records outside the rspec
|
||||||
# lifecycle, e.g. inside a describe/context block rather than a
|
# lifecycle, e.g. inside a describe/context block rather than a
|
||||||
# let/before/example
|
# let/before/example
|
||||||
|
BlankSlateProtection.truncate_all_tables! unless defined?(TestQueue::Runner::RSpec) # we do this in each runner
|
||||||
BlankSlateProtection.install!
|
BlankSlateProtection.install!
|
||||||
|
|
||||||
ActionView::TestCase::TestController.view_paths = ApplicationController.view_paths
|
ActionView::TestCase::TestController.view_paths = ApplicationController.view_paths
|
||||||
|
|
|
@ -48,7 +48,6 @@ module BlankSlateProtection
|
||||||
end
|
end
|
||||||
|
|
||||||
def install!
|
def install!
|
||||||
truncate_all_tables!
|
|
||||||
::RSpec::Core::Example.prepend Example
|
::RSpec::Core::Example.prepend Example
|
||||||
::ActiveRecord::Base.include ActiveRecord
|
::ActiveRecord::Base.include ActiveRecord
|
||||||
@enabled = true
|
@enabled = true
|
||||||
|
|
Loading…
Reference in New Issue