Añade el plugin Redmine Git Hosting 5.0.0
This commit is contained in:
parent
cfa0d58b18
commit
a3bddad233
458 changed files with 30396 additions and 1 deletions
55
plugins/redmine_git_hosting/spec/root_spec_helper.rb
Normal file
55
plugins/redmine_git_hosting/spec/root_spec_helper.rb
Normal file
|
@ -0,0 +1,55 @@
|
|||
if ENV['COVERAGE']
|
||||
require 'simplecov'
|
||||
|
||||
## Start Simplecov
|
||||
SimpleCov.start 'rails' do
|
||||
add_group 'Redmine Git Hosting', 'plugins/redmine_git_hosting'
|
||||
end
|
||||
end
|
||||
|
||||
unless defined? 'HOME_BASE_DIR'
|
||||
HOME_BASE_DIR = RUBY_PLATFORM.include?('darwin') ? '/Users' : '/home'
|
||||
end
|
||||
|
||||
## Load Redmine App
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
require File.expand_path "#{File.dirname __FILE__}/../config/environment"
|
||||
require 'rspec/rails'
|
||||
|
||||
## Load FactoryBots factories
|
||||
Dir[Rails.root.join('plugins/*/spec/factories/**/*.rb')].each { |f| require f }
|
||||
|
||||
Dir[Rails.root.join('plugins/*/spec/support/**/*.rb')].each { |f| require f }
|
||||
|
||||
## Configure RSpec
|
||||
RSpec.configure do |config|
|
||||
config.include FactoryBot::Syntax::Methods
|
||||
|
||||
config.infer_spec_type_from_file_location!
|
||||
|
||||
config.color = true
|
||||
config.fail_fast = false
|
||||
|
||||
config.expect_with :rspec do |c|
|
||||
c.syntax = :expect
|
||||
end
|
||||
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
||||
config.after(:each) do
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
||||
|
||||
# Disable Test::Unit automatic runner
|
||||
Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner)
|
Loading…
Add table
Add a link
Reference in a new issue