Questions tagged as 'minitest'

3
answers

How do I work with tests and fixtures on a database that contains foreign key constraints in Rails?

I am using RubyOnRails 4.1 and PostgreSQL database and I use gem foreigner to create foreign key constraints in the bank. It turns out that this makes some tasks difficult with fixtures . When I try to run a test: spring rake test I...
asked by 21.08.2014 / 13:43
1
answer

Test boot time in Ruby on Rails

In Ruby on Rails, using the Minitest library, the runtime of the tests is fast. But the boot time before each rake test (...) is very annoying. Is there any way to make it faster? Update I tried to install Spring here ( gem 'spri...
asked by 06.05.2014 / 15:47
1
answer

Unit test in Ruby does not work

I am running a simple unit test and on my machine it does not show whether the test ran successfully or error. My code below should fail. require 'minitest/autorun' class MagicBallTest < Minitest::Test def test_ask_returns_an_answer...
asked by 27.05.2018 / 17:53
1
answer

How to test the locals on a render?

I have the following question, I make my tests using Ministest, however I have a problem when testing the locals of a render ... I do not know how to test, for example: Controller: def salvou render('cadastro/salvou', locals: {id: params...
asked by 30.06.2014 / 21:23