Skip to content

Commit

Permalink
exclude rails routes
Browse files Browse the repository at this point in the history
  • Loading branch information
vast committed Sep 12, 2013
1 parent 1071c8b commit a1561f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/api_taster/route.rb
Expand Up @@ -37,6 +37,7 @@ def normalise_routes!
route_set.routes.each do |route|
next if route.app.is_a?(Sprockets::Environment)
next if route.app == ApiTaster::Engine
next if route.defaults[:controller].to_s.starts_with?('rails/')

rack_app = discover_rack_app(route.app)

Expand Down
3 changes: 3 additions & 0 deletions spec/route_spec.rb
Expand Up @@ -32,6 +32,9 @@ module ApiTaster
end
mount Rails.application => '/app'
mount proc {} => '/rack_app'

get 'rails/info/properties' => 'rails/info#properties', :as => :rails_info_properties
get '/' => 'rails/welcome#index'
end

Rails.application.stub(:routes).and_return(routes)
Expand Down

0 comments on commit a1561f5

Please sign in to comment.