Commit 98ac072e04d3754afed8a7ef7bf39ed3d02444c3
1 parent
2ff377f4
Exists in
master
and in
29 other branches
ActionItem265: fixing test
for when config file is not actually present git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1937 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
test/unit/google_maps_test.rb
... | ... | @@ -10,11 +10,13 @@ class GoogleMapsTest < Test::Unit::TestCase |
10 | 10 | end |
11 | 11 | |
12 | 12 | should 'retrieve key from "web2.0" config file' do |
13 | + File.expects(:exists?).with(CONFIG_FILE).returns(true) | |
13 | 14 | YAML.expects(:load_file).with(CONFIG_FILE).returns({'googlemaps' => { 'key' => 'MYKEY' }}) |
14 | 15 | assert_equal 'MYKEY', GoogleMaps.key |
15 | 16 | end |
16 | 17 | |
17 | 18 | should 'enable when key is defined' do |
19 | + File.expects(:exists?).with(CONFIG_FILE).returns(true) | |
18 | 20 | YAML.expects(:load_file).with(CONFIG_FILE).returns({'googlemaps' => { 'key' => 'MYKEY' }}) |
19 | 21 | assert GoogleMaps.enabled? |
20 | 22 | end | ... | ... |