Skip to main content
0 votes
1 answer
47 views

At 10 a.m. an object becomes active and visible to the user. seconds_since_midnight.to_i at 10:00 is 36000, but that is not timezone aware. application_controller sets a tenant and its timezone, based ...
Jerome's user avatar
  • 6,355
0 votes
0 answers
57 views

The following params are submitted in different actions the following manner ?acc_ids%5B%5D=246&acc_ids%5B%5D=247&acc_ids%5B%5D=248 with Parameters: {"acc_ids"=>["246", &...
Jerome's user avatar
  • 6,355
1 vote
1 answer
46 views

I am using minitest for testing in RubyMine and want to work out how to turn on the 'Click to see difference' comparison window for failed tests so that I can read JSON more easily. In the past I ...
Rory A's user avatar
  • 11
0 votes
1 answer
26 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.
broiling-clamshell's user avatar
0 votes
2 answers
174 views

Webmock provides a suggested stub for a Rails controller action. I have not found proper syntax required for the return body. The request (abbreviated) intent = Stripe::PaymentIntent.create({ amount:...
Jerome's user avatar
  • 6,355
0 votes
0 answers
47 views

I'm trying figure out how to run a single test within a single file in MiniTest. Here's the directory structure: Here's the content of Rakefile: require 'minitest/test_task' Minitest::TestTask....
tscheingeld's user avatar
0 votes
1 answer
55 views

I'm working on a Ruby gem. I'm writing unit tests for it in minitest. Currently I'm using require_relative 'lib/my_gem' to load the gem scripts for test purposes. Eventually I'll be publishing the gem ...
JohnA's user avatar
  • 899
0 votes
0 answers
102 views

I have a series of minitests that work just fine Ubuntu 22.04.2 Ruby ruby 3.2.3 minitest:4.25.4 rake:13.2.1 These are being kicked off with rake: bundle exec rake test $@ # rakefile: require 'rake/...
JohnA's user avatar
  • 899
1 vote
2 answers
147 views

I'm working on a Ruby on Rails project and practicing Test-Driven Development (TDD) using Minitest. For user authentication (using Devise), I wrote a test to check that a user cannot sign up without ...
obreil54's user avatar
-1 votes
1 answer
133 views

I believe all end-developer code (including constants) should be tested (as mentioned here). I'm not looking for a debate on that. Assume I have these Ruby and/or Rails constants that I'd like to test ...
BenFenner's user avatar
  • 1,094
0 votes
1 answer
51 views

Creating my first Selenium test, I get the following excpetion Error: LoginsTest#...
Julien Lamarche's user avatar
1 vote
3 answers
433 views

I'm trying to build a Ruby gem. I set up a development environment using a Docker image based on Ruby 3.3 and a devcontainer. I initialized a gem using the bundle gem tooling. This set up the basic ...
Thomas Owens's user avatar
2 votes
1 answer
496 views

Can I test broadcasts_refreshes in my ActiveJob tests? Or maybe in my model tests? Is there another place where I should be testing this? According to the Broadcastable docs (my emphasis added): ...
Matthew's user avatar
  • 1,776
0 votes
1 answer
67 views

I am following the authlogic setup for authenticating an admin user during testing setup using minitest ( https://github.com/binarylogic/authlogic/blob/master/lib/authlogic/test_case.rb ). It seems ...
Jacob Miller's user avatar
1 vote
3 answers
104 views

When to_json is called on an object in Rails, the datetime objects are converted to the ISO 8601 standard automatically which is an excellent tool for sending data back to a client. [43] pry(main)> ...
Arslan Ali's user avatar
  • 17.9k

15 30 50 per page
1
2 3 4 5
105