Sha256: 25b891fc827544f3bc224c5d01b8782e190afbd47a2af2f449952f08ef9feab0

Contents?: true

Size: 669 Bytes

Versions: 24

Compression:

Stored size: 669 Bytes

Contents

require "action_dispatch/testing/assertions/routing"

module RSpec::Rails
  module RoutingExampleGroup
    extend ActiveSupport::Concern
    include RSpec::Rails::RailsExampleGroup
    include ActionDispatch::Assertions::RoutingAssertions
    include RSpec::Rails::Matchers::RoutingMatchers
    include RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers

    included do
      metadata[:type] = :routing

      before do
        @routes = ::Rails.application.routes
      end
    end

    attr_reader :routes

    private

    def method_missing(m, *args, &block)
      routes.url_helpers.respond_to?(m) ? routes.url_helpers.send(m, *args) : super
    end
  end
end

Version data entries

24 entries across 19 versions & 4 rubygems

Version Path
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.12.0 lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.11.4 lib/rspec/rails/example/routing_example_group.rb
gem_repackager-0.1.0 support/gems/rspec-rails-2.11.0/lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.11.0 lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/rspec-rails-2.10.1/lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.10.1 lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.10.0 lib/rspec/rails/example/routing_example_group.rb
rspec-rails-2.9.0 lib/rspec/rails/example/routing_example_group.rb