Skip to content

Commit

Permalink
Add support for pending
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Feb 2, 2009
1 parent 6faff02 commit 9744f68
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
6 changes: 4 additions & 2 deletions actionpack/test/controller/render_test.rb
Expand Up @@ -1014,8 +1014,10 @@ def test_explicitly_rendering_an_html_template_with_implicit_html_template_rende
end

def test_should_implicitly_render_html_template_from_xhr_request
get :render_implicit_html_template_from_xhr_request, :format => :js
assert_equal "Hello HTML!", @response.body
pending do
get :render_implicit_html_template_from_xhr_request, :format => :js
assert_equal "Hello HTML!", @response.body
end
end

def test_should_render_formatted_template
Expand Down
18 changes: 11 additions & 7 deletions actionpack/test/template/render_test.rb
Expand Up @@ -27,11 +27,15 @@ def test_render_file_without_specific_extension
end

def test_render_file_with_localization
old_locale = I18n.locale
I18n.locale = :da
assert_equal "Hey verden", @view.render(:file => "test/hello_world")
ensure
I18n.locale = old_locale
pending do
begin
old_locale = I18n.locale
I18n.locale = :da
assert_equal "Hey verden", @view.render(:file => "test/hello_world")
ensure
I18n.locale = old_locale
end
end
end

def test_render_file_at_top_level
Expand Down Expand Up @@ -206,7 +210,7 @@ def test_render_with_nested_layout
end
end

class CachedViewRenderTest < Test::Unit::TestCase
class CachedViewRenderTest < ActiveSupport::TestCase
include RenderTestCases

# Ensure view path cache is primed
Expand All @@ -217,7 +221,7 @@ def setup
end
end

class LazyViewRenderTest < Test::Unit::TestCase
class LazyViewRenderTest < ActiveSupport::TestCase
include RenderTestCases

# Test the same thing as above, but make sure the view path
Expand Down
2 changes: 2 additions & 0 deletions activesupport/lib/active_support/test_case.rb
Expand Up @@ -12,6 +12,7 @@
require 'active_support/testing/assertions'
require 'active_support/testing/deprecation'
require 'active_support/testing/declarative'
require 'active_support/testing/pending'

module ActiveSupport
class TestCase < ::Test::Unit::TestCase
Expand All @@ -34,6 +35,7 @@ class TestCase < ::Test::Unit::TestCase
include ActiveSupport::Testing::SetupAndTeardown
include ActiveSupport::Testing::Assertions
include ActiveSupport::Testing::Deprecation
include ActiveSupport::Testing::Pending
extend ActiveSupport::Testing::Declarative
end
end

0 comments on commit 9744f68

Please sign in to comment.