aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/action_view_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-03-13 11:52:53 +0000
committerPratik Naik <pratiknaik@gmail.com>2008-03-13 11:52:53 +0000
commit58c30f61351dae43900c3b6cb5dd3622f12ecee0 (patch)
tree855d064b9eba2d482a2279cb6fb2b11b178ca56c /actionpack/test/action_view_test.rb
parent1e0ac3a673a6cc92c1c6c5bc84180afeb60241d9 (diff)
downloadrails-58c30f61351dae43900c3b6cb5dd3622f12ecee0.tar.gz
rails-58c30f61351dae43900c3b6cb5dd3622f12ecee0.tar.bz2
rails-58c30f61351dae43900c3b6cb5dd3622f12ecee0.zip
Move tests from action_view_test.rb to template_finder_test.rb so that they get run by default take task. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/action_view_test.rb')
-rw-r--r--actionpack/test/action_view_test.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/actionpack/test/action_view_test.rb b/actionpack/test/action_view_test.rb
deleted file mode 100644
index fb27fbfec4..0000000000
--- a/actionpack/test/action_view_test.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-require 'abstract_unit'
-
-class ActionViewTests < Test::Unit::TestCase
- def test_find_template_extension_from_first_render
- base = ActionView::Base.new
-
- assert_nil base.send(:find_template_extension_from_first_render)
-
- {
- nil => nil,
- '' => nil,
- 'foo' => nil,
- '/foo' => nil,
- 'foo.rb' => 'rb',
- 'foo.bar.rb' => 'bar.rb',
- 'baz/foo.rb' => 'rb',
- 'baz/foo.bar.rb' => 'bar.rb',
- 'baz/foo.o/foo.rb' => 'rb',
- 'baz/foo.o/foo.bar.rb' => 'bar.rb',
- }.each do |input,expectation|
- base.instance_variable_set('@first_render', input)
- assert_equal expectation, base.send(:find_template_extension_from_first_render)
- end
- end
-
- def test_should_report_file_exists_correctly
- base = ActionView::Base.new
-
- assert_nil base.send(:find_template_extension_from_first_render)
-
- assert_equal false, base.send(:file_exists?, 'test.rhtml')
- assert_equal false, base.send(:file_exists?, 'test.rb')
-
- base.instance_variable_set('@first_render', 'foo.rb')
-
- assert_equal 'rb', base.send(:find_template_extension_from_first_render)
-
- assert_equal false, base.send(:file_exists?, 'baz')
- assert_equal false, base.send(:file_exists?, 'baz.rb')
-
- end
-
-end