Sha256: 96675603a91fa63721268c08c8be9c9e9607052cfd1030fecb2902b04cd8af51

Contents?: true

Size: 1.56 KB

Versions: 5

Compression:

Stored size: 1.56 KB

Contents

ENV['RAILS_ENV'] ||= 'test'
ENV['MUMUKI_ENABLED_LOGIN_PROVIDERS'] = 'developer'

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rspec/rails'
require 'codeclimate-test-reporter'
require 'mumukit/core/rspec'
require 'factory_bot_rails'

require 'mumuki/domain/factories'

ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false
  config.order = '1'
  config.include FactoryBot::Syntax::Methods
end

require_relative './evaluation_helper'

RSpec.configure do |config|
  config.before(:each) { I18n.locale = :en }

  config.before(:each) do
    if RSpec.current_example.metadata[:organization_workspace] == :test
      create(:test_organization).switch!
    end
  end

  config.after(:each) do
    Mumukit::Platform::Organization.leave! if RSpec.current_example.metadata[:organization_workspace]
  end
end

Mumukit::Platform.configure do |config|
  config.application = Mumukit::Platform::Application::Organic.new 'http://sample.app.com', Mumukit::Platform.organization_mapping
end

Mumukit::Auth.configure do |c|
  c.clients.default = {id: 'test-client', secret: 'thisIsATestSecret'}
end

def reindex_organization!(organization)
  organization.reload
  organization.reindex_usages!
end

def reindex_current_organization!
  reindex_organization! Organization.current
end

SimpleCov.start

# shibi 「死び」 is the ghost cousin of kibi 「きび」
User.configure_buried_profile! first_name: 'shibi', last_name: '', email: 'shibi@mumuki.org'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mumuki-laboratory-7.7.1 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-cb7a9018bb94/spec/spec_helper.rb
mumuki-laboratory-7.7.0 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-cb7a9018bb94/spec/spec_helper.rb
mumuki-laboratory-7.5.2 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-ad16a5930cec/spec/spec_helper.rb
mumuki-laboratory-7.5.1 vendor/bundle/ruby/2.3.0/bundler/gems/mumuki-domain-a059418e5fd8/spec/spec_helper.rb
mumuki-laboratory-7.5.0 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-acb12583b793/spec/spec_helper.rb