-
Notifications
You must be signed in to change notification settings - Fork 17
/
RUNNING_TESTS
43 lines (29 loc) · 1.29 KB
/
RUNNING_TESTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# use this to recreate test database
bundle exec rake db:drop db:create db:migrate RAILS_ENV=test REDMINE_LANG=en
bundle exec rake redmine:load_default_data RAILS_ENV=test REDMINE_LANG=en
# preload Redmine fixtures
bundle exec rake db:fixtures:load redmine:plugins:migrate RAILS_ENV=test
# configure channels.yaml
cd plugins/haltr/config && ln -s channels.yml.example channels.yml; cd -
# to run test with Zeus + Guard
#
# https://github.com/burke/zeus
# https://github.com/guard/guard
# start zeus
zeus start
# start guard in another terminal
bundle exec guard -G plugins/haltr/Guardfile
##### ISSUES #####
# In redmine-2.3 some fixtures do not load.
# Remove them
rm -rf test/fixtures/configuration/
# changing some models fully reloads zeus, making it so slow: https://github.com/burke/zeus/issues/433#issuecomment-31518132
# https://github.com/guard/guard-minitest/pull/98
# tests run twice after saving file on vim. To avoid this, use last guard-minitest from github (included in bundle):
# if no test is run, remove from Redmine's Gemfile the line:
# gem "test-unit", "~> 3.0
# with Zeus < 0.15.1
#
# running all tests on guard crashes due to this bug: https://github.com/burke/zeus/issues/352
# fixed in zeus 0.15.1, but you can still run all tests in older versions with:
zeus test plugins/haltr/test