10 Commits

Author SHA1 Message Date
Ivan Kuchin dfead9fdbe frozen_string_literal in changed specs 2025-03-18 19:35:08 +01:00
Ivan Kuchin 2c1d112aea use require_relative in specs 2025-03-18 19:35:08 +01:00
Aaron Contreras f033a5ecca Address "implicit block expectation syntax" deprecation warning (#13534)
* Fix implicit block syntax deprecation warnings in `user_spec.rb`

```
The implicit block expectation syntax is deprecated, you should pass
a block rather than an argument to `expect` to use the provided block
expectation matcher or the matcher must implement
`supports_value_expectations?`.

e.g  `expect { value }.to change `User#local_avatar_attachment``
not `expect(value).to change `User#local_avatar_attachment``
```

```
The implicit block expectation syntax is deprecated, you should
pass a block rather than an argument to `expect` to use the provided
block expectation matcher or the matcher must implement
`supports_value_expectations?`.

e.g  `expect { value }.to raise Exception`
not `expect(value).to raise Exception`
```

* Adjust context phrasing to adhere to Rubocop guidelines

"^when" instead of "^WHEN"

* Adjust `require` statement to use interpolation

Appeases Rubocop complaint for String concatenation being used instead
of String interpolation.

* Use `specify` instead of `it` for no implicit subject example
2023-08-21 22:58:06 +03:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther 7dbecdcf79 Prepare for core integration 2018-11-14 13:57:39 +01:00