class HelperExtension

Attributes

current_methods[RW]
output_buffer[RW]

Public Class Methods

new(name) click to toggle source
# File lib/minitest_rails_tools/helper_extension.rb, line 10
def initialize(name)
  @output_buffer = ''
  @current_methods ||= []
  # Remove existing instance methods.
  @current_methods.each do |method_name|
    self.class.send(:remove_method, method_name)
  end
  # Add new instance methods from helper module.
  klass = name.to_s.camelize.safe_constantize
  @current_methods = klass.instance_methods
  self.class.send(:include, klass)
end

Public Instance Methods

protect_against_forgery?() click to toggle source

We don't need this protection in our tests.

# File lib/minitest_rails_tools/helper_extension.rb, line 24
def protect_against_forgery?
  false
end