rubocop-discourse 3.13.3 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -3
  3. data/lib/rubocop/cop/discourse/plugins/call_requires_plugin.rb +1 -2
  4. data/lib/rubocop/cop/discourse/plugins/no_monkey_patching.rb +5 -12
  5. data/lib/rubocop/cop/discourse/plugins/use_plugin_instance_on.rb +1 -2
  6. data/lib/rubocop/cop/discourse/services/empty_lines_around_blocks.rb +6 -12
  7. data/lib/rubocop/cop/discourse/services/group_keywords.rb +2 -7
  8. data/lib/rubocop/discourse/version.rb +1 -1
  9. data/rubocop-core.yml +2 -143
  10. data/rubocop-discourse.gemspec +15 -2
  11. data/rubocop-layout.yml +2 -80
  12. data/rubocop-rspec.yml +9 -215
  13. metadata +5 -35
  14. data/.github/workflows/ci.yml +0 -41
  15. data/.gitignore +0 -1
  16. data/.rspec +0 -1
  17. data/.rubocop.yml +0 -9
  18. data/.streerc +0 -2
  19. data/Gemfile +0 -11
  20. data/Rakefile +0 -8
  21. data/spec/fixtures/controllers/bad_controller.rb +0 -5
  22. data/spec/fixtures/controllers/base_controller.rb +0 -11
  23. data/spec/fixtures/controllers/good_controller.rb +0 -4
  24. data/spec/fixtures/controllers/inherit_from_outside_controller.rb +0 -5
  25. data/spec/fixtures/controllers/namespaced_parent_controller.rb +0 -5
  26. data/spec/fixtures/controllers/no_requires_plugin_controller.rb +0 -5
  27. data/spec/fixtures/controllers/requires_plugin_controller.rb +0 -6
  28. data/spec/lib/rubocop/cop/discourse/services/empty_lines_around_blocks_spec.rb +0 -309
  29. data/spec/lib/rubocop/cop/discourse/services/group_keywords_spec.rb +0 -137
  30. data/spec/lib/rubocop/cop/fabricator_shorthand_spec.rb +0 -71
  31. data/spec/lib/rubocop/cop/no_add_reference_active_record_migrations_spec.rb +0 -47
  32. data/spec/lib/rubocop/cop/no_mixing_multisite_and_standard_specs_spec.rb +0 -68
  33. data/spec/lib/rubocop/cop/no_mocking_jobs_enqueue_spec.rb +0 -31
  34. data/spec/lib/rubocop/cop/no_reset_column_information_migrations_spec.rb +0 -33
  35. data/spec/lib/rubocop/cop/only_top_level_multisite_specs_spec.rb +0 -78
  36. data/spec/lib/rubocop/cop/plugins/call_requires_plugin_spec.rb +0 -79
  37. data/spec/lib/rubocop/cop/plugins/namespace_constants_spec.rb +0 -40
  38. data/spec/lib/rubocop/cop/plugins/namespace_methods_spec.rb +0 -84
  39. data/spec/lib/rubocop/cop/plugins/no_monkey_patching_spec.rb +0 -91
  40. data/spec/lib/rubocop/cop/plugins/use_plugin_instance_on_spec.rb +0 -37
  41. data/spec/lib/rubocop/cop/plugins/use_require_relative_spec.rb +0 -24
  42. data/spec/lib/rubocop/cop/time_eq_matcher_spec.rb +0 -23
  43. data/spec/spec_helper.rb +0 -15
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- RSpec.describe RuboCop::Cop::Discourse::TimeEqMatcher, :config do
4
- subject(:cop) { described_class.new(config) }
5
-
6
- let(:config) { RuboCop::Config.new }
7
-
8
- it "raises an offense if a timestamp is compared using `eq`" do
9
- offenses = inspect_source(<<~RUBY)
10
- expect(user.created_at).to eq(Time.zone.now)
11
- RUBY
12
-
13
- expect(offenses.first.message).to match(described_class::MSG)
14
- end
15
-
16
- it "passes if a timestamp is compared using `eq_time`" do
17
- offenses = inspect_source(<<~RUBY)
18
- expect(user.created_at).to eq_time(Time.zone.now)
19
- RUBY
20
-
21
- expect(offenses).to be_empty
22
- end
23
- end
data/spec/spec_helper.rb DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/setup"
4
- Bundler.setup
5
-
6
- # Require supporting files exposed for testing.
7
- require "rubocop"
8
- require "rubocop/rspec/support"
9
-
10
- require "rubocop-discourse" # and any other gems you need
11
-
12
- RSpec.configure do |config|
13
- config.include RuboCop::RSpec::ExpectOffense
14
- # some (optional) config here
15
- end