Top "Minitest" questions

a testing framework that comes in the standard library of Ruby 1.9.

stub any_instance using Minitest

How can I do the following without using any_instance from Mocha? I just want to test a protected Controller …

ruby-on-rails mocha.js minitest doorkeeper
Why doesn't MiniTest::Spec have a wont_raise assertion?

Ruby's Test::Unit has assert_nothing_raised. Test::Unit has been replaced by MiniTest. Why don't MiniTest's assertions / expectations have …

ruby unit-testing minitest
ArgumentError: wrong number of arguments (2 for 1) for 'initialize'?

Fairly new to ruby, playing with Mini Test and log4r, trying to write a wrapper class. Getting the following …

ruby minitest log4r
Can minitest do something like "rspec --color --format doc"?

I want a pretty-printed summary of what tests are running, similar to rspec --color --format doc Can minitest do that?

ruby testing minitest
How to Pass an authorization-token-header in an integration-test?

A related question implies that I can test a request with token authentication, in my intergration tests, as follows: get "/…

ruby-on-rails ruby-on-rails-4 minitest
Why would rails not reset the test database between runs

There are comments in the rails codebase that indicate that the test database should be reset between runs rake -T …

ruby-on-rails testing factory-bot minitest
Factory Girl pass parameter to trait

I've been banging my head over this. I want to be able to overwrite attributes on top of traits. I've …

ruby-on-rails factory-bot minitest
Rails 4 + Devise: How to write a test for Devise Reset Password without RSpec?

For reasons outside of my control, I can't use RSpec for testing in my current project. I'm trying to test …

ruby-on-rails ruby-on-rails-4 devise minitest
How do I add gem 'minitest' to my test helper?

I am new to Ruby on Rails and testing. When I run rake test I get the following error: /Users/…

ruby-on-rails tdd minitest