buildkite / test-collector-ruby

Buildkite Test Analytics collector for Ruby test frameworks

Home Page:http://buildkite.com/test-analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow_any_instance_of(<class>).to receive(:<method_name?>) failure

kphatak opened this issue · comments

Env

 ~/git/repo/ [master] bundle exec rspec --version
RSpec 3.9
  - rspec-core 3.9.1
  - rspec-expectations 3.9.1
  - rspec-mocks 3.9.1
  - rspec-rails 3.9.1
  - rspec-support 3.9.2
 ~/git/repo [master] bundle exec ruby --version
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]

Error

Failures:
  1) Users Managing users POST <some_endpoint> create a user with valid params
     Failure/Error:
       allow_any_instance_of(::RBAC::Client).to receive(:build_http_client)
 
       RBAC::Client does not implement #build_http_client
     # /usr/local/bundle/gems/buildkite-test_collector-1.1.1/lib/buildkite/test_collector/library_hooks/rspec.rb:25:in `block (2 levels) in <top (required)>'

This looks related to #123 but we are already stubbing the class.
I would appreciate any help. TIA.

Nvm. Code issue. Fixed.