Class: Capybara::Rails::TestCase

Inherits:
ActiveSupport::TestCase
  • Object
show all
Includes:
Assertions, DSL, Minitest::Metadata
Defined in:
lib/minitest/rails/capybara.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object

:nodoc:



54
55
56
57
58
59
60
# File 'lib/minitest/rails/capybara.rb', line 54

def method_missing(sym, *args, &block) # :nodoc:
  if __rails_helpers__.respond_to?(sym, true)
    __rails_helpers__.__send__(sym, *args, &block)
  else
    super
  end
end

Instance Method Details

#__rails_helpers__Object

Defer rails helpers methods to a different object



48
49
50
# File 'lib/minitest/rails/capybara.rb', line 48

def __rails_helpers__ # :nodoc:
  @__rails_helpers__ ||= ::Capybara::Rails::Helpers.new
end

#respond_to?(method, include_private = false) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


51
52
53
# File 'lib/minitest/rails/capybara.rb', line 51

def respond_to?(method, include_private = false) # :nodoc:
  __rails_helpers__.respond_to?(method, include_private) || super
end