Sha256: 0c942552757fe73fe46e96c2904011ed636b271ab034e7db4f9792099f765f88
Contents?: true
Size: 643 Bytes
Versions: 10
Compression:
Stored size: 643 Bytes
Contents
Given 'the routes are loaded' do @routes = Rails.application.routes end Then 'the following routes should be recognized:' do |table| table.hashes.each do |options| method_and_path = options.slice('method', 'path') expected_options = options.except('method', 'path', 'params') expected_options.each { |name, value| expected_options.delete(name) if value.blank? } options['params'].split(',').each do |param| name, value = param.split(':').map(&:strip) expected_options[name] = value end if options['params'] assert_recognizes(expected_options.symbolize_keys, method_and_path.symbolize_keys) end end
Version data entries
10 entries across 10 versions & 1 rubygems