colorls/spec/color_ls/yaml_spec.rb
Claudio Bley 6b35f942aa Fix offenses newly reported by rubocop-rspec
The pessimistic version contraint on rubocop-rspec permitted minor version
updates of the dependency, which broke the tests again since version 2.9.0
introduced / changed offenses.

Allow only the patch version to increase automatically to avoid this in the future.
2022-02-28 21:37:11 +01:00

24 lines
508 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe ColorLS::Yaml do
filenames = {
file_aliases: :value,
folder_aliases: :value,
folders: :key,
files: :key
}.freeze
let(:base_directory) { 'lib/yaml' }
filenames.each do |filename, sort_type|
describe filename do
let(:checker) { YamlSortChecker.new("#{base_directory}/#{filename}.yaml") }
it 'is sorted correctly' do
expect(checker.sorted?(sort_type)).to be true
end
end
end
end