Limit the size of repository files displayed inline too.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2505 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-02-21 16:04:51 +00:00
parent 79c074dbe5
commit 1c5a2ddfb0
3 changed files with 21 additions and 2 deletions
+7
View File
@@ -64,4 +64,11 @@ class Test::Unit::TestCase
Dir.mkdir "#{RAILS_ROOT}/tmp/test/attachments" unless File.directory?("#{RAILS_ROOT}/tmp/test/attachments")
Attachment.storage_path = "#{RAILS_ROOT}/tmp/test/attachments"
end
def with_settings(options, &block)
saved_settings = options.keys.inject({}) {|h, k| h[k] = Setting[k].dup; h}
options.each {|k, v| Setting[k] = v}
yield
saved_settings.each {|k, v| Setting[k] = v}
end
end