Commit 5937f2d06af0f3367ca4b8b3d5652263144e47fa
1 parent
e1a0da01
Exists in
staging
and in
42 other branches
Make test predictable by using own environment
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
test/test_helper.rb
... | ... | @@ -2,8 +2,8 @@ ENV["RAILS_ENV"] = "test" |
2 | 2 | |
3 | 3 | # Start/stop Solr |
4 | 4 | if not $test_helper_loaded |
5 | - abort unless system 'rake solr:start' | |
6 | - at_exit { system 'rake solr:stop' } | |
5 | + abort unless system 'rake -s solr:start' | |
6 | + at_exit { system 'rake -s solr:stop' } | |
7 | 7 | $test_helper_loaded = true |
8 | 8 | end |
9 | 9 | ... | ... |
test/unit/profile_test.rb
... | ... | @@ -1218,10 +1218,10 @@ class ProfileTest < ActiveSupport::TestCase |
1218 | 1218 | end |
1219 | 1219 | |
1220 | 1220 | should 'be possible to have different profiles with the same identifier in different environments' do |
1221 | - p1 = fast_create(Profile, :identifier => 'mytestprofile') | |
1222 | - | |
1223 | - env = fast_create(Environment) | |
1224 | - p2 = create(Profile, :identifier => 'mytestprofile', :environment => env) | |
1221 | + env1 = fast_create(Environment) | |
1222 | + p1 = create(Profile, :identifier => 'mytestprofile', :environment => env1) | |
1223 | + env2 = fast_create(Environment) | |
1224 | + p2 = create(Profile, :identifier => 'mytestprofile', :environment => env2) | |
1225 | 1225 | |
1226 | 1226 | assert_not_equal p1.environment, p2.environment |
1227 | 1227 | end | ... | ... |