Skip to content

Instantly share code, notes, and snippets.

@bjpcjp
Created July 30, 2020 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjpcjp/73c9f2048fe174ec335c891815731778 to your computer and use it in GitHub Desktop.
Save bjpcjp/73c9f2048fe174ec335c891815731778 to your computer and use it in GitHub Desktop.
Rails 6.0.2.3 - test failure out-of-the-box
# Rails 6.0.2.3
# 'Behavior' = std Rails scaffold with one name:string attribute.
# rails db:migrate = no problem.
# rails test = 2 fails below. other controllers (~60, identical except for object name) pass.
Error:
BehaviorsControllerTest#test_should_destroy_behavior:
NoMethodError: undefined method `count' for ActionDispatch::IntegrationTest::Behavior:Module
test/controllers/behaviors_controller_test.rb:42:in `block in <class:BehaviorsControllerTest>'
test/controllers/behaviors_controller_test.rb:42:in `block in <class:BehaviorsControllerTest>'
Error:
BehaviorsControllerTest#test_should_create_behavior:
NoMethodError: undefined method `count' for ActionDispatch::IntegrationTest::Behavior:Module
test/controllers/behaviors_controller_test.rb:19:in `block in <class:BehaviorsControllerTest>'
test/controllers/behaviors_controller_test.rb:19:in `block in <class:BehaviorsControllerTest>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment