summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-07 17:12:17 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-07 17:12:17 +0300
commit7a89cef601dde68d5964f68bb6fe2e94d72fcf55 (patch)
tree2528eb772fe03eb0c273fe44dd8d87dc2cd24a24 /spec
parent4dcf2f1c2dca266743f66056a382afe0002a7d3e (diff)
parent2838a993da78bf365d7a84dc51f57a605fc99c96 (diff)
downloadgitlab-ce-7a89cef601dde68d5964f68bb6fe2e94d72fcf55.tar.gz
Merge pull request #7092 from jvanbaarsen/tmp-fix-for-rspec
Temp fix for rspec so the specs are run again
Diffstat (limited to 'spec')
-rw-r--r--spec/spec_helper.rb3
-rw-r--r--spec/support/db_cleaner.rb24
2 files changed, 23 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e6b1f816df0..65a641bcf12 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -27,6 +27,8 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
+ config.use_transactional_fixtures = false
+ config.use_instantiated_fixtures = false
config.mock_with :rspec
config.include LoginHelpers, type: :feature
@@ -39,7 +41,6 @@ RSpec.configure do |config|
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
- config.use_transactional_fixtures = false
config.before(:suite) do
TestEnv.init(observers: false, init_repos: true, repos: false)
diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb
index f2b310245bd..d2d532d9738 100644
--- a/spec/support/db_cleaner.rb
+++ b/spec/support/db_cleaner.rb
@@ -1,13 +1,31 @@
+# RSpec.configure do |config|
+
+# config.around(:each) do |example|
+# DatabaseCleaner.strategy = :transaction
+# DatabaseCleaner.clean_with(:truncation)
+# DatabaseCleaner.cleaning do
+# example.run
+# end
+# end
+
+# config.around(:each, js: true) do |example|
+# DatabaseCleaner.strategy = :truncation
+# DatabaseCleaner.clean_with(:truncation)
+# DatabaseCleaner.cleaning do
+# example.run
+# end
+# end
+# end
RSpec.configure do |config|
- config.around(:each) do
+ config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
- config.around(:each) do
+ config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
- config.around(:each, js: true) do
+ config.before(:each, :js => true) do
DatabaseCleaner.strategy = :truncation
end