GithubHelp home page GithubHelp logo

Comments (4)

palkan avatar palkan commented on May 30, 2024

:test adapter is meant to be used with unit-tests, not system tests; that's why it doesn't support subscribing/unsubscribing

try to add "action_cable/testing/rspec/features" to your rails_helper.rb to use :async adapter in features specs (see https://relishapp.com/palkan/action-cable-testing/docs/shared-contexts/action-cable-shared-contexts#require-features-specs-setup)

from action-cable-testing.

jsgarvin avatar jsgarvin commented on May 30, 2024

Ah, excellent information. Thank you! However, it turns out that I was still on 0.3.1 🤦‍♂️ of action-cable-testing. When I updated to 0.3.4 this evening, it all just worked without doing what you suggested above.

So, I did a little digging, and I'm wondering, could 71f909a (which was introduced in 0.3.2) be doing for me what you recommended above? In other words, maybe the test adapter now works with feature specs, free of charge?

I tried adding action_cable/testing/rspec/features to the rails_helper, but I'm still getting the Test adapter (i.e. this passes. expect(ActionCable.server.pubsub).to be_a(ActionCable::SubscriptionAdapter::Test) inside the feature spec.

As I said, it's working now, however, I'd like to know that it's working because it's supposed to be working, and not because I'm inadvertently making use of a genuine "undocumented feature" that's not supported and may disappear.

from action-cable-testing.

palkan avatar palkan commented on May 30, 2024

Oh, yeah, you're right, we've added this functionality recently.

I tried adding action_cable/testing/rspec/features to the rails_helper, but I'm still getting the Test adapter (i.e. this passes. expect(ActionCable.server.pubsub).to be_a(ActionCable::SubscriptionAdapter::Test) inside the feature spec.

Do you have in your RSpec configuration infer_spec_type_from_location? We rely on RSpec tags in this feature.

from action-cable-testing.

jsgarvin avatar jsgarvin commented on May 30, 2024

As a matter of fact, I do. Seems to work great. Thanks. Sorry for opening a ticket without checking if I was up to date first. (sigh).

from action-cable-testing.

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.