add zone test-rspec

This commit is contained in:
Min Zeya Phyo
2017-03-24 21:28:57 +06:30
parent 3ec71e85fe
commit a247cd44eb
19 changed files with 108 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ require 'database_cleaner'
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
# Checks for pending migration and applies them before tests are run.
# If you are not using ActiveRecord, you can remove this line.
@@ -43,6 +43,9 @@ RSpec.configure do |config|
# add `FactoryGirl` methods
config.include FactoryGirl::Syntax::Methods
config.include RequestSpecHelper, type: :request
# start by truncating all the tables but then use the faster transaction strategy the rest of the time.
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)