Module: ActionController::Assertions

Included in:
Integration::Session, Test::Unit::TestCase
Defined in:
lib/action_controller/assertions.rb,
lib/action_controller/assertions/dom_assertions.rb,
lib/action_controller/assertions/tag_assertions.rb,
lib/action_controller/assertions/model_assertions.rb,
lib/action_controller/assertions/routing_assertions.rb,
lib/action_controller/assertions/response_assertions.rb,
lib/action_controller/assertions/selector_assertions.rb,
lib/action_controller/assertions/deprecated_assertions.rb

Overview

:nodoc:

Defined Under Namespace

Modules: DeprecatedAssertions, DomAssertions, ModelAssertions, ResponseAssertions, RoutingAssertions, SelectorAssertions, TagAssertions

Constant Summary collapse

NO_STRIP =
%w{pre script style textarea}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/action_controller/assertions.rb', line 47

def self.included(klass)
  klass.class_eval do
    include ActionController::Assertions::ResponseAssertions
    include ActionController::Assertions::SelectorAssertions
    include ActionController::Assertions::RoutingAssertions
    include ActionController::Assertions::TagAssertions
    include ActionController::Assertions::DomAssertions
    include ActionController::Assertions::ModelAssertions
    include ActionController::Assertions::DeprecatedAssertions
  end
end

Instance Method Details

#clean_backtrace(&block) ⇒ Object



59
60
61
62
63
64
# File 'lib/action_controller/assertions.rb', line 59

def clean_backtrace(&block)
  yield
rescue Test::Unit::AssertionFailedError => e         
  path = File.expand_path(__FILE__)
  raise Test::Unit::AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ }
end