Parent

Class/Module Index [+]

Quicksearch

Shoulda::Matchers::ActionController::RedirectToMatcher

@private

Attributes

failure_message[R]
failure_message_for_should[R]
failure_message_for_should_not[R]
failure_message_when_negated[R]

Public Class Methods

new(url_or_description, context, &block) click to toggle source
# File lib/shoulda/matchers/action_controller/redirect_to_matcher.rb, line 49
def initialize(url_or_description, context, &block)
  @url_block = nil
  @url = nil
  @context = context
  @failure_message = nil
  @failure_message_when_negated = nil

  if block
    @url_block = block
    @location = url_or_description
  else
    @location = @url = url_or_description
  end
end

Public Instance Methods

description() click to toggle source
# File lib/shoulda/matchers/action_controller/redirect_to_matcher.rb, line 74
def description
  "redirect to #{@location}"
end
in_context(context) click to toggle source
# File lib/shoulda/matchers/action_controller/redirect_to_matcher.rb, line 64
def in_context(context)
  @context = context
  self
end
matches?(controller) click to toggle source
# File lib/shoulda/matchers/action_controller/redirect_to_matcher.rb, line 69
def matches?(controller)
  @controller = controller
  redirects_to_url?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.