Ruby on Rails Friday, February 10, 2017

Below is what the console is reporting when I run the test.
As you can notice, the test raises one error: method any? on nil class (the instance variable @atp_tournaments of the code in my first post).
If I change this instance variable with its explicit value, the next error is of next method on next variable and so on.

me@SATELLITE-L50-A-161:~/workspace/fantasytennis_app (tabbed-navigation)*$ rails test test/integration/microposts_interface_test.rb
Running via Spring preloader in process 7112
Started with run options --seed 4407

ERROR["test_micropost_interface", MicropostsInterfaceTest, 6.374447322000378]
 test_micropost_interface#MicropostsInterfaceTest (6.37s)
ActionView::Template::Error:         ActionView::Template::Error: undefined method `any?' for nil:NilClass
            app/views/static_pages/_gamers_home.html.erb:44:in `_app_views_static_pages__gamers_home_html_erb___4018195177444297552_78940320'
            app/views/static_pages/home.html.erb:3:in `_app_views_static_pages_home_html_erb___222411343280921082_78889880'
            app/controllers/microposts_controller.rb:12:in `create'
            test/integration/microposts_interface_test.rb:16:in `block (2 levels) in <class:MicropostsInterfaceTest>'
            test/integration/microposts_interface_test.rb:15:in `block in <class:MicropostsInterfaceTest>'

  2/2: [==========================================================================] 100% Time: 00:00:06, Time: 00:00:06

Finished in 6.63174s
2 tests, 8 assertions, 0 failures, 1 errors, 0 skips

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment