Using dependent on a have_one matcher doesn't seem to work on 4.4.0, but worked on 4.3.0.
RSpec.describe Person, type: :model do
it { should have_one(:contract).dependent(:destroy) }
end
$ rspec
Randomized with seed 30332
1) Person
Failure/Error: it { should have_one(:contract).dependent(:destroy) }
NoMethodError:
undefined method `dependent' for #<RSpec::Matchers::BuiltIn::Has:0x0000564a1e04f5d8>
Same with have_many:
Failure/Error: it { is_expected.to have_many(:products).dependent(:destroy) }
NoMethodError:
undefined method `dependent' for #<RSpec::Matchers::BuiltIn::Has:0x000055e2152c1710>
Thank you for creating this issue.
There is already a PR to solve this problem.
Soon, we will have a new release with this fix.
Fixed in v4.4.1!