Skip to content

Commit

Permalink
Add a test for the issue #335 fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Aug 22, 2009
1 parent 45168c9 commit 006b691
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/integration_tests/apache2_tests.rb
Expand Up @@ -99,15 +99,10 @@
end

it "supports environment variable passing through mod_env" do
begin
File.open("#{@stub.app_root}/public/.htaccess", 'w') do |f|
f.puts 'SetEnv FOO "Foo Bar!"'
end
File.touch("#{@stub.app_root}/tmp/restart.txt")
get('/welcome/environment').should =~ /FOO = Foo Bar\!/
ensure
File.unlink("#{@stub.app_root}/public/.htaccess") rescue nil
end
File.write("#{@stub.app_root}/public/.htaccess", 'SetEnv FOO "Foo Bar!"')
File.touch("#{@stub.app_root}/tmp/restart.txt")
get('/welcome/environment').should =~ /FOO = Foo Bar\!/
get('/welcome/cgi_environment').should =~ /FOO = Foo Bar\!/
end
end

Expand Down

0 comments on commit 006b691

Please sign in to comment.