rspec

  1. M

    RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of problem

    Help me. I don't understand how to fix it. I tried to many variations... driver_iq_driver_spec.rb describe '.perform' do it 'correctly parse response' do driver = described_class.new(dot_application, background_check_type, provider_setting).perform expect(driver).to...
  2. D

    Composing matchers in Rspec

    Rspec supports composing matchers. The list of composing matchers it provides is this: all(matcher) include(matcher, matcher) start_with(matcher) end_with(matcher) contain_exactly(matcher, matcher, matcher) match(matcher) change {}.from(matcher).to(matcher) change {}.by(matcher) The all...
  3. K

    Theo dõi các class có cùng Namespace

    Mình đang tạo spy cho hai class thuộc cùng một Namespace với mục tiêu mong muốn mỗi class nhận các đối số cụ thể: allow(SibApiV3Sdk::SendSmtpEmail).to receive(:new).and_return(seb_send_email) allow(SibApiV3Sdk::SMTPApi).to receive(:new).and_return(seb_smtp_api) def seb_send_email...
Top