3 # Système de gestion des adhésions de Nos oignons
4 # Copyright © 2013-2014 Nos oignons <contact@nos-oignons.net>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 require 'aruba/cucumber'
29 SafeYAML::OPTIONS[:default_mode] = :safe
31 Aruba.configure do |config|
32 config.io_wait_timeout = 0.1
33 config.exit_timeout = 20
39 ENV['GIT_COMMITTER_NAME'] = ENV['GIT_AUTHOR_NAME'] = 'J. Test'
40 ENV['GIT_COMMITTER_EMAIL'] = ENV['GIT_AUTHOR_EMAIL'] = 'test@example.org'
41 @orig_wiki_path = ENV['NOS_OIGNONS_BOARD_WIKI_PATH']
42 @orig_reminder_db_path = ENV['NOS_OIGNONS_REMINDER_DB']
43 @orig_receipts_dir = ENV['NOS_OIGNONS_RECEIPTS_DIR']
44 ENV['NOS_OIGNONS_REMINDER_DB'] = expand_path('reminders.yaml')
45 NosOignons::ReminderDb.instance.reload!
46 ENV['NOS_OIGNONS_RECEIPTS_DIR'] = expand_path('receipts')
47 FileUtils.mkdir(ENV['NOS_OIGNONS_RECEIPTS_DIR'])
51 Mail::TestMailer.deliveries.clear
55 ENV['NOS_OIGNONS_REMINDER_DB'] = @orig_reminder_db_path
56 ENV['NOS_OIGNONS_BOARD_WIKI_PATH'] = @orig_wiki_path
57 ENV['NOS_OIGNONS_RECEIPTS_DIR'] = @orig_receipts_dir