File: route_displayer_spec.rb

package info (click to toggle)
ruby-grape-path-helpers 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 192 kB
  • sloc: ruby: 814; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 587 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

describe GrapePathHelpers::RouteDisplayer do
  subject(:route_displayer) { described_class.new }

  describe '#route_attributes' do
    subject { route_displayer.route_attributes }

    it 'returns the list of attributes' do
      is_expected.to include(a_hash_including(
                               route_path: '/:version/ping(.:format)',
                               route_method: 'GET',
                               helper_names: ['beta_1_ping_path'],
                               helper_arguments: []
                             ))
    end
  end
end