class RuboCop::Cop::RSpec::VerifiedDoubleReference

Checks for consistent verified double reference style.

@see rspec.info/features/3-12/rspec-mocks/verifying-doubles

@safety

This cop is unsafe because the correction requires loading the class.
Loading before stubbing causes RSpec to only allow instance methods
to be stubbed.

@example

# bad
let(:foo) do
  instance_double('ClassName', method_name: 'returned_value')
end

# good
let(:foo) do
  instance_double(ClassName, method_name: 'returned_value')
end

@example Reference is any dynamic variable. No enforcement

# good
let(:foo) do
  instance_double(@klass, method_name: 'returned_value')
end