File: detects_style_behavior.rb

package info (click to toggle)
ruby-rubocop-rspec 2.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,892 kB
  • sloc: ruby: 22,283; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

RSpec.shared_examples 'detects style' do |source, style, filename: 'x_spec.rb'|
  it 'generates a todo based on the detected style' do
    inspect_source(source, filename)

    expect(cop.config_to_allow_offenses).to eq('EnforcedStyle' => style)
  end
end