Sha256: 4d2cbbfcf3cdd0ca650c6e46e154a3d926b065c2bbb34875b83dd6fd07f51df1

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

require 'rspec'
require 'fabrication'

require 'dotenv'
Dotenv.load(File.expand_path("../.env", File.dirname(__dir__)))

require 'roqua-core-api'
include Roqua::CoreApi
include Roqua::CoreApi::Sessions
include Roqua::CoreApi::Models

# It seems sometimes the Rails constant is defined and Rails.root is injected (which is nil at that moment) resulting
# in missing fabricators. Let's just set the path to the current directory to fix this. See:
# https://github.com/paulelliott/fabrication/blob/42db96f11cbf80d22bd9c87dbf6740894c2b2bdc/lib/fabrication/config.rb#L42
Fabrication::Config.path_prefix = ['.']
Fabrication.manager.load_definitions

Dir[File.join(File.expand_path(__dir__), 'support', '*.rb')].each { |f| require f }

I18n.load_path << Dir[File.join(File.expand_path(__dir__), '..', 'config', 'locales', '*.yml')]
I18n.enforce_available_locales = false
I18n.default_locale = :nl

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
roqua-core-api-0.4.0 spec/spec_helper.rb