Coder Social home page Coder Social logo

Comments (12)

palkan avatar palkan commented on June 16, 2024 1

Any advices with how to fix that?

The easiest way to fix Spring is to get rid off it))

from active_delivery.

brovikov avatar brovikov commented on June 16, 2024 1

@palkan probably we could in doc explicitly tell to use require "active_delivery/testing/rspec" because now it shows require "active_delivery/testing" and it doesn't make a trick for me, when spring is using.

from active_delivery.

iBublik avatar iBublik commented on June 16, 2024

Oh, I found that the actual reason is Spring. Any advices with how to fix that?

from active_delivery.

iBublik avatar iBublik commented on June 16, 2024

I understand, but it's not an option for now :)

from active_delivery.

palkan avatar palkan commented on June 16, 2024

the actual reason is Spring

Could you tell more about this? Spring shouldn't break anything after restart

from active_delivery.

iBublik avatar iBublik commented on June 16, 2024

After some debugging I found that this check fails https://github.com/palkan/active_delivery/blob/master/lib/active_delivery/testing.rb#L48 and file is not required. Don't know why running via Spring makes RSpec constant to be not defined at this moment.
For now I just added require 'active_delivery/testing/rspec' in my rails_helper.rb and everything works fine. I can make a PR with addition to documentation about this case if it's ok to you

from active_delivery.

palkan avatar palkan commented on June 16, 2024

Don't know why running via Spring makes RSpec constant to be not defined at this moment.

Got it.

Do you have spring-commands-rspec?_)

We had a similar problem in test-prof: test-prof/test-prof#8

Solution would be to change the check to defined?(RSpec::Core). Could you check it and propose a PR if it works?

from active_delivery.

iBublik avatar iBublik commented on June 16, 2024

Do you have spring-commands-rspec?_)

Bingo :)

Solution would be to change the check to defined?(RSpec::Core). Could you check it and propose a PR if it works?

Unfortunately it didn't help

from active_delivery.

palkan avatar palkan commented on June 16, 2024

Hm, what about adding require "active_delivery/testing/rspec" to rails_helper.rb explicitly?

from active_delivery.

iBublik avatar iBublik commented on June 16, 2024

Hm, what about adding require "active_delivery/testing/rspec" to rails_helper.rb explicitly?

Already done that, see my comment #12 (comment)

from active_delivery.

palkan avatar palkan commented on June 16, 2024

Sorry, missed this.

I can make a PR with addition to documentation about this case if it's ok to you

That would be great)

from active_delivery.

palkan avatar palkan commented on June 16, 2024

Done. Thanks!

from active_delivery.

Related Issues (14)

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.