I have a model that is used by multiple libs, each of these libs is using it with different approaches. For the moment I made a factory file, which contains mul
I have a "Copy Link" button in my frontend UI. When clicked, the URL inside an input box is copied to the user's clipboard with this JS: const copyTextarea = d
I am trying to get a good output for a custom matcher I wrote: RSpec::Matchers.define :scope_limited_to do |expected| match do |actual| @actual = actual.l
I want to test a specific namespace of rake tasks and I am getting an error from rubocop. desc 'This namespace is test' namespace :test_namespace do task tes
I have a method but doesn't have a parameter, for example def goodbye puts "" puts "Thank you, #{name} for using our service." puts "Good luck with
I'm trying this gem called FactoryBotRails. For some reason, when I try it on one of my models unit tests, the following error is thrown. Failure/Error: my_
I am updating an older app's Ruby and Rails versions and attempting to get all of the feature tests passing. Most of them were failing due to still relying on c
I am using rails 6.1.4 (Ubuntu 20.04) and am running tests with rspec, factorybot, and capybara. I also got database_cleaner where I'm using :truncation to star
I want to test controller's action and flash messages presence with rspec. action: def create user = Users::User.find_by_email(params[:email]) if user
I am facing a wired issue, factoryBot is creating a record in Db, but when capybara try to access it, there is no record in HTML. I tried debugging with "byebu
I'm using RSpec to test controller behavior in rails. One of the expectations I have is the following scenario: User attempts to access a protected (requires l
I'm making a rails 3.1 app using carrierwave to upload files to aws s3. I've followed the instructions on the carrierwave github repository and am now able to
So I am currently writing a test for a controller in an existing controller that just didn't have one before. What I want to test is a redirect that happens whe