You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the tests in Chapter 3.3.1, the console is showing that the tests are running twice for some reason.
Running via Spring preloader in process 4008
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here
Run options: --seed 61073
# Running:
Run options: --seed 61073
# Running:
....
Finished in 0.315740s, 6.3343 runs/s, 6.3343 assertions/s.
2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
Finished in 0.315642s, 6.3363 runs/s, 6.3363 assertions/s.
This shouldn't be a problem, but when I try to do more than one failing test (for example, the test in 3.3.2 as well as changing "should get help" so that assert_response is looking for :error), it fails the first failing test and immediately exits instead of moving to the next test.
ec2-user:~/environment/sample_app2 (static-pages) $ rails test
Running via Spring preloader in process 4101
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here
Run options: --seed 63669
# Running:
Run options: --seed 63669
# Running:
FF
Failure:
StaticPagesControllerTest#test_should_get_help [/home/ec2-user/environment/sample_app2/test/controllers/static_pages_controller_test.rb:11]:
Expected response to be a <5XX: error>, but was a <200: OK>
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_should_get_help' for class `Minitest::Result' (NameError)
from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `format_rerun_snippet'
from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:23:in `record'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:786:in `block in record'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:785:in `each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:785:in `record'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:334:in `run_one_method'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:321:in `block (2 levels) in run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:320:in `each'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:320:in `block in run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:360:in `on_signal'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:347:in `with_info_handler'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:319:in `run'
from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/line_filtering.rb:9:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `block in __run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `map'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `__run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:136:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:63:in `block in autorun'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `fork'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `serve'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
This has happened both on my own local machine and on my Cloud9 environment, even when I tried redoing the first part of chapter 3 to make sure I hadn't installed anything incorrectly. Does this issue pop up for anybody else using the tutorial?
The text was updated successfully, but these errors were encountered:
It turns out this is an issue having to do with minitest-reporters and how it interacts with minitest after Rails 5.1.3, discussed in more detail here. Until this issue is properly fixed, I'm going to do the tutorial without minitest-reporters since it's not absolutely essential, and I'd recommend that the guide either mention that issue or figure out a way to fix it.
hlu:~/environment/quote (master) $ rails test
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here
Run options: --seed 33572
...
And as I do not like them too, I was trying to fix them. In the end it was fixed for me by updating rails gem from 5.1.4 to 5.1.5 in Cloud9 with:
As @JCattera points out this is an error with minitest and Rails, and will be fixed upstream at some point.
In the mean time, if you want to fix this so that guard works properly, add the following line to your Gemfile: gem 'minitest', '5.10.1'
This will keep the minitest version that was working properly before this regression error appeared. I find it quite useful to have guard working in the background while doing the tutorial.
When I run the tests in Chapter 3.3.1, the console is showing that the tests are running twice for some reason.
This shouldn't be a problem, but when I try to do more than one failing test (for example, the test in 3.3.2 as well as changing "should get help" so that assert_response is looking for :error), it fails the first failing test and immediately exits instead of moving to the next test.
This has happened both on my own local machine and on my Cloud9 environment, even when I tried redoing the first part of chapter 3 to make sure I hadn't installed anything incorrectly. Does this issue pop up for anybody else using the tutorial?
The text was updated successfully, but these errors were encountered: