brew/Library/Homebrew/test/rubocops/platform_spec.rb
apainintheneck c477b9aab3 Cleanup after adding os specific rubocop
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
  checks to extend/os in the future
2022-11-29 23:13:50 -08:00

23 lines
530 B
Ruby

# typed: false
# frozen_string_literal: true
require "rubocops/platform"
describe RuboCop::Cop::Homebrew::MoveToExtendOS do
subject(:cop) { described_class.new }
it "registers an offense when using `OS.linux?`" do
expect_offense(<<~RUBY)
OS.linux?
^^^^^^^^^ Move `OS.linux?` and `OS.mac?` calls to `extend/os`.
RUBY
end
it "registers an offense when using `OS.mac?`" do
expect_offense(<<~RUBY)
OS.mac?
^^^^^^^ Move `OS.linux?` and `OS.mac?` calls to `extend/os`.
RUBY
end
end