Permalink
Browse files

Whitespace + formatting

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b0bfcca commit 4942e5b1cbad6ee8e9340cfd5e1f643d850eeaa0 @jeremy jeremy committed Mar 25, 2008
Showing with 11 additions and 16 deletions.
  1. +4 −6 actionpack/lib/action_view/template_finder.rb
  2. +7 −10 actionpack/test/template/template_finder_test.rb
@@ -159,12 +159,10 @@ def find_template_extension_from_first_render
end
private
-
- def check_view_paths(view_paths)
- view_paths.each do |path|
- raise InvalidViewPath.new(path) unless @@processed_view_paths.has_key?(path)
+ def check_view_paths(view_paths)
+ view_paths.each do |path|
+ raise InvalidViewPath.new(path) unless @@processed_view_paths.has_key?(path)
+ end
end
- end
-
end
end
@@ -30,8 +30,8 @@ def test_should_cache_dir_content_properly
assert_equal Dir.glob("#{LOAD_PATH_ROOT}/**/*").find_all {|f| !File.directory?(f) }.size,
ActionView::TemplateFinder.processed_view_paths[LOAD_PATH_ROOT].size
end
-
- def test_find_template_extension_from_first_render
+
+ def test_find_template_extension_from_first_render
assert_nil @finder.send(:find_template_extension_from_first_render)
{
@@ -50,26 +50,23 @@ def test_find_template_extension_from_first_render
assert_equal expectation, @finder.send(:find_template_extension_from_first_render)
end
end
-
+
def test_should_report_file_exists_correctly
- assert_nil @finder.send(:find_template_extension_from_first_render)
+ assert_nil @finder.send(:find_template_extension_from_first_render)
assert_equal false, @finder.send(:file_exists?, 'test.rhtml')
assert_equal false, @finder.send(:file_exists?, 'test.rb')
@template.instance_variable_set('@first_render', 'foo.rb')
-
- assert_equal 'rb', @finder.send(:find_template_extension_from_first_render)
+
+ assert_equal 'rb', @finder.send(:find_template_extension_from_first_render)
assert_equal false, @finder.send(:file_exists?, 'baz')
assert_equal false, @finder.send(:file_exists?, 'baz.rb')
end
-
- uses_mocha 'Template finder tests' do
+ uses_mocha 'Template finder tests' do
def test_should_update_extension_cache_when_template_handler_is_registered
ActionView::TemplateFinder.expects(:update_extension_cache_for).with("funky")
ActionView::Template::register_template_handler :funky, Class.new(ActionView::TemplateHandler)
end
-
end
-
end

0 comments on commit 4942e5b

Please sign in to comment.