Running feature specs? #1759
Replies: 2 comments 4 replies
-
We run our tests with rspec. Never used Cuprite. |
Beta Was this translation helpful? Give feedback.
-
Cuprite is really just a replacement for Selenium to drive the Chrome browser in the end. I've put a simple test repo here: https://github.com/dark-panda/avo-test You can run the feature spec and you'll see that two things happen:
It's the second one that's the issue because from the perspective of the feature spec, the Puma instance isn't running with a pro license, but we do have a pro license. Because the Puma instance is isolated, it doesn't see the specs, and therefore doesn't have its request mocked. It might be worth just not doing a request when the Rails environment is |
Beta Was this translation helpful? Give feedback.
-
G'day folks.
I'm writing out a few feature specs for some custom actions and tools I've created, but I'm running into license issues. We have a pro license, but when we run our feature specs we're running into license issues where it says we're running a null license and gives us the banner across the top of the page and whole bit. We're running our specs via Cuprite and Capybara through RSpec. It seems to do a license check when it runs a Puma instance, and the response there doesn't contain the
id
field, which causes it to revert to a null license. I can't stub this out via the usual RSpec mechanisms because you can only stub out the the calls made within the spec suite itself, and this is coming from the actual Rails server it spins up.Any thoughts on how we can stub this out for testing?
Beta Was this translation helpful? Give feedback.
All reactions