Commit 0bf069f7a013cd761e67c2243ddecbe423f489cf
1 parent
b014a9d1
Exists in
master
and in
27 other branches
rails3: fix multitenancy unit tests
Showing
1 changed file
with
1 additions
and
4 deletions
Show diff stats
test/unit/multi_tenancy.rb
| ... | ... | @@ -48,11 +48,8 @@ class MultiTenancyTest < ActiveSupport::TestCase |
| 48 | 48 | |
| 49 | 49 | def test_if_is_hosted_environment |
| 50 | 50 | YAML.expects(:load_file).returns(db_config) |
| 51 | - Object.send(:remove_const, :RAILS_ENV) | |
| 52 | - Object.const_set(:RAILS_ENV, 'one_test') | |
| 51 | + Rails.stubs(:env).returns('one_test') | |
| 53 | 52 | assert Noosfero::MultiTenancy.send(:is_hosted_environment?) |
| 54 | - Object.send(:remove_const, :RAILS_ENV) | |
| 55 | - Object.const_set(:RAILS_ENV, 'test') | |
| 56 | 53 | end |
| 57 | 54 | |
| 58 | 55 | def test_if_is_not_hosted_environment | ... | ... |