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
34 ENV['GIT_COMMITTER_NAME'] = ENV['GIT_AUTHOR_NAME'] = 'J. Test'
35 ENV['GIT_COMMITTER_EMAIL'] = ENV['GIT_AUTHOR_EMAIL'] = 'test@example.org'
36 @tmpdir = Dir.mktmpdir('gestion-adh')
38 @aruba_io_wait_seconds = 0.1
39 @aruba_timeout_seconds = 20
40 @orig_wiki_path = ENV['NOS_OIGNONS_BOARD_WIKI_PATH']
41 @orig_reminder_db_path = ENV['NOS_OIGNONS_REMINDER_DB']
42 @orig_receipts_dir = ENV['NOS_OIGNONS_RECEIPTS_DIR']
43 ENV['NOS_OIGNONS_REMINDER_DB'] = File.join(current_dir, 'reminders.yaml')
44 NosOignons::ReminderDb.instance.reload!
45 ENV['NOS_OIGNONS_RECEIPTS_DIR'] = File.join(current_dir, 'receipts')
46 FileUtils.mkdir(ENV['NOS_OIGNONS_RECEIPTS_DIR'])
50 Mail::TestMailer.deliveries.clear
54 ENV['NOS_OIGNONS_REMINDER_DB'] = @orig_reminder_db_path
55 ENV['NOS_OIGNONS_BOARD_WIKI_PATH'] = @orig_wiki_path
56 ENV['NOS_OIGNONS_RECEIPTS_DIR'] = @orig_receipts_dir
57 FileUtils.remove_entry_secure @tmpdir