Integration tests for the timeline

I’m trying to create some tests for Shouter application. During testing adding new text shout, I get template error:

  1. my scenario:

     scenario 'logged user can see his shouts and shouts of followed users' do
       sign_in(email: 'other_user@example.com', password: 'secret')
         within '#new_text_shout' do
         click_button 'Shout!'
       end
    end
    
  2. error:

    ActionView::Template::Error: ‘nil’ is not an ActiveModel-compatible object that returns a valid partial path.
    ./app/views/shouts/_shout.html.erb:7:in block in _app_views_shouts__shout_html_erb___4466291708817419200_70254766367340' ./app/views/shouts/_shout.html.erb:2:in _app_views_shouts__shout_html_erb___4466291708817419200_70254766367340’
    ./app/views/timelines/_timeline.html.erb:2:in _app_views_timelines__timeline_html_erb__1634247727950472309_70254755366160' ./app/views/dashboards/show.html.erb:11:in _app_views_dashboards_show_html_erb__248944996709712812_70254751982080’
    ./spec/features/timeline_spec.rb:14:in block (3 levels) in <top (required)>' ./spec/features/timeline_spec.rb:13:in block (2 levels) in <top (required)>’

Can anyone can help me understand what’s going on ?

Ok, I found the bug. I tried to create shout with empty text.