use minimal app_config for tests

This commit is contained in:
wvengen 2014-03-28 12:52:11 +01:00
parent 0ed867b991
commit ed439d0b08
3 changed files with 38 additions and 1 deletions

33
spec/app_config.yml Normal file
View file

@ -0,0 +1,33 @@
# Minimal Foodsoft configuration
#
# Without those settings, Foodsoft may not even work.
# This file is used when running tests. When plugins would modify foodsoft behaviour
# and they are enabled in the sample configuration, there is stable base to test with.
default: &defaults
multi_coop_install: false
default_scope: 'f'
host: localhost
name: FC Minimal
contact:
email: fc@minimal.test
# true by default to keep compat with older installations, but test with false here
use_nick: false
# do we really need the following ones?
price_markup: 5.0
tax_default: 6.0
email_sender: noreply@minimal.test
development:
<<: *defaults
test:
<<: *defaults
production:
<<: *defaults

View file

@ -1,5 +1,6 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
ENV["FOODSOFT_APP_CONFIG"] ||= 'spec/app_config.yml' # load special foodsoft config
require_relative 'support/coverage' # needs to be first
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'