Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
2 votes
1 answer
70 views

I have a Thor class that has a getter method defined like this: # Playgrounds CLI skeleton class. # Commands are added from commands folder class CLI < Thor def self.exit_on_failure? true ...
2 votes
0 answers
88 views

I have a problem with one of my class methods. class Input # Method to get a valid number of days to assign prices to def Input.get_valid_number_of_days puts "Time to enter the number of ...
Neblinus's user avatar
1 vote
1 answer
98 views

Finished in 0.0137 seconds (files took 0.0769 seconds to load) 5 examples, 1 failure Failed examples: rspec ./spec/basic_math_spec.rb:10 # Basic-Math Subtract numbers Error: Process completed with ...
cluster1's user avatar
  • 6,128
0 votes
1 answer
79 views

I am hoping someone can point out what I am doing wrong. I wanted to configure RSpec/Capybara to do my system tests such that the default behaviour would be to run headless, but if I set js:true on ...
1 vote
1 answer
64 views

I have several tables in my application which are associated with a user. In order to run my integration tests the application first needs to log in the test user. config.before(:each, :type => ...
3 votes
2 answers
126 views

In Ruby, I need to print a feedback message and then exit with a status code of 1. class Foo def bar puts "error" exit 1 end end In RSpec, how can I ignore exit 1 when expecting ...
Sig's user avatar
  • 6,150
0 votes
1 answer
27 views

I've seen a lot of questions about errors concerning action_mailer.default_url_options and default_url_options[:host] during system tests. Below I share a good solution I found.
0 votes
0 answers
51 views

In a Rails app for managing course bookings, I want to keep the updated_at timestamps of related models in sync. Here's the setup: class ShopOrder < ApplicationRecord delegated_type :...
1 vote
0 answers
47 views

So i have a "Delete" link that brings up a html confirm modal. In my rspec system test though, it keeps erroring out with both errror messages Capybara::ModalNotFound and Selenium::WebDriver:...
0 votes
0 answers
79 views

In this code, sync_external accepts an array of posts and modifies it by calling a sync method from an external module ExternalService, which is mocked in the test. Assume there's some reason to pass ...
0 votes
1 answer
47 views

I have a Rails controller I'm trying to write a new method for, and I'm running into an issue writing the tests for it. I've simplified the methods and tests repeatedly just trying to get something to ...
1 vote
2 answers
177 views

I created a new Rails 8 application. I installed RSpec for testing. $ rails g authentication invoke erb create app/views/passwords/new.html.erb create app/views/passwords/edit....
1 vote
0 answers
101 views

I'm having an issue running my RSpec suite. The suite is "old," and everything worked fine until a few days ago when system specs started to fail without an apparent reason. All the failures ...
Sig's user avatar
  • 6,150
0 votes
1 answer
76 views

I have an interesting problem, and do not know if I am overthinking something, or just missing the big picture. I have a Rspec feature test iterating over each possible "user flow". Each "user flow" ...
0 votes
1 answer
50 views

I have a Rails 6.1 controller that sets: # File: app/controllers/foo_controller.rb rescue_from Exception, with: :error_handler My Rspec 6.1 test (is a "request" type) is like: # File: spec/...

15 30 50 per page
1
2 3 4 5
...
1219

AltStyle によって変換されたページ (->オリジナル) /