Giter VIP home page Giter VIP logo

Comments (9)

GeoffTidey avatar GeoffTidey commented on September 24, 2024 2

Hi @ArturT , sorry for the radio silence. It's not been happening at all since my last update. Two things have changed, the first is probably the issue:

  1. I moved the KnapsackPro::Adapters::RSpecAdapter.bind to spec/spec_helper.rb (it was perviously in another helper that is only loaded for system tests),
  2. the other is we're now using GitHub Actions for CI, rather than Heroku CI.

from knapsack_pro-ruby.

ArturT avatar ArturT commented on September 24, 2024 1

@GeoffTidey Thank you for providing solution to your issue.

@AnkeshThakur Could you ensure KnapsackPro::Adapters::RSpecAdapter.bind is in spec/spec_helper.rb?

You could also update the knapsack_pro gem to the latest version. We released a couple of improvements.

I'd appreciate an update from you. If it's no longer a relevant issue, please let me know.

from knapsack_pro-ruby.

AnkeshThakur avatar AnkeshThakur commented on September 24, 2024 1

@ArturT apology for silence. I'm no longer integrating KnapsackPro. For me older version (<7.0.0) worked without issue.

I have not updated it to later version to check if 7+ versions are working or not.

from knapsack_pro-ruby.

GeoffTidey avatar GeoffTidey commented on September 24, 2024

I'm seeing the same issue with instance_double intermittently with v7

e.g/

Failure/Error: meh = instance_double(MyClass, this_does_exist: 42)

the MyClass class does not implement the instance method: this_does_exist

Just in case it's not obvious, the instance method does exist :)

from knapsack_pro-ruby.

ArturT avatar ArturT commented on September 24, 2024

Could you prepare an integration test like this one to help us reproduce an issue?

Or it could be a new Rails app that we could use to debug it?

Thank you.

from knapsack_pro-ruby.

GeoffTidey avatar GeoffTidey commented on September 24, 2024

Hi @ArturT do you mean something like https://github.com/KnapsackPro/knapsack_pro-ruby/pull/247/files ?

from knapsack_pro-ruby.

ArturT avatar ArturT commented on September 24, 2024

@GeoffTidey Yes.

I've run this test and it's passing successful.

➜  knapsack_pro-ruby git:(pr/247) rspec spec/integration/runners/queue/rspec_runner_spec.rb:382
Resolving dependencies...
Run options: include {:locations=>{"./spec/integration/runners/queue/rspec_runner_spec.rb"=>[382]}}

Randomized with seed 65516

KnapsackPro::Runners::Queue::RSpecRunner - Integration tests
  when rails_helper file exists
    requires the rails_helper file when running RSpec and runs hooks defined within it

Finished in 0.2351 seconds (files took 0.42629 seconds to load)
1 example, 0 failures

Randomized with seed 65516

We need to prepare a test that would fail with the same error as you see in your project. Then we could prepare a fix for that.

Are you able to identify what is causing the error in your project?

from knapsack_pro-ruby.

GeoffTidey avatar GeoffTidey commented on September 24, 2024

Afraid not. It's intermittent.

from knapsack_pro-ruby.

ArturT avatar ArturT commented on September 24, 2024

I use the following loop to run test as long until it fails but it is successful. I'm not able to reproduce the issue.

while bundle exec rspec "spec/integration/runners/queue/rspec_runner_spec.rb:382"; do :; done

I use ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin22].

I tried to reproduce it on an older RSpec version without success:

# source Gemfile.lock in the knasack_pro gem 
rspec (3.11.0)
  rspec-core (~> 3.11.0)
  rspec-expectations (~> 3.11.0)
  rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
  rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
  diff-lcs (>= 1.2.0, < 2.0)
  rspec-support (~> 3.11.0)
rspec-its (1.3.0)
  rspec-core (>= 3.0.0)
  rspec-expectations (>= 3.0.0)
rspec-mocks (3.11.1)
  diff-lcs (>= 1.2.0, < 2.0)
  rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rspec_junit_formatter (0.6.0)
  rspec-core (>= 2, < 4, != 2.12.0)

I also tried to use the latest gems, but I'm not able to reproduce the issue:

rspec (3.13.0)
  rspec-core (~> 3.13.0)
  rspec-expectations (~> 3.13.0)
  rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
  rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
  diff-lcs (>= 1.2.0, < 2.0)
  rspec-support (~> 3.13.0)
rspec-its (1.3.0)
  rspec-core (>= 3.0.0)
  rspec-expectations (>= 3.0.0)
rspec-mocks (3.13.0)
  diff-lcs (>= 1.2.0, < 2.0)
  rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
  rspec-core (>= 2, < 4, != 2.12.0)

@GeoffTidey Could you provide your Ruby and dependency versions? It will help pinpoint what differs between our setups.

from knapsack_pro-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.