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

Version Path
adva-core-0.0.14 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.13 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.9 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.8 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.7 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.6 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.5 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.4 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.2 lib/testing/step_definitions/routes_steps.rb
adva-core-0.0.1 lib/testing/step_definitions/routes_steps.rb