Sha256: 9f8760d53cafc7713707080b14b8dbc4fe3a7a63a079893129036cee78950fda

Contents?: true

Size: 437 Bytes

Versions: 1

Compression:

Stored size: 437 Bytes

Contents

require 'rad/router'

rspec do
  def self.with_router
    include Rad::CoreRoutingHelper
  end  
end

# Rad::Response.class_eval do
#   def success?
#     headers['Location'].blank?
#   end
# end

rspec.define_matcher :redirect_to do |actual, expected|
  (actual.headers['Location'] and actual.headers['Location'].include?(expected)) or
    (actual.body and actual.body.include?('window.location') and actual.body.include?(expected))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rad_core-0.0.13 lib/rad/spec/router.rb