title: Following Rails Tutorial and a syntax error is stopping a test passing
body: <p>Unfortunately I am receiving a syntax error that is hiding for me. Could anyone help? I understand it is relevant to the method 'assert_select' for the divs, but I am not sure why it is not passing.</p>
  
  <p>My error: </p>
  
  <pre><code>Error:
  UsersSignupTest#test_invalid_signup_information:
  Nokogiri::CSS::SyntaxError: unexpected '#' after '[#&lt;Nokogiri::CSS::Node:0x0055b3736715e8 @type=:ELEMENT_NAME, @value=["div"]&gt;]'
      test/integration/users_signup_test.rb:15:in `block in &lt;class:UsersSignupTest&gt;'
  </code></pre>
  
  <p>My test:</p>
  
  <pre><code>require 'test_helper'
  
  class UsersSignupTest &lt; ActionDispatch::IntegrationTest
      test "invalid signup information" do
          get signup_path
          assert_no_difference 'User.count' do
              post users_path, params: { user: {
                  name: "",
                  email: "user@invalid",
                  password: "foo",
                  password_confirmation: "bar"
                  }}
              end
              assert_template 'users/new'
              assert_select 'div#&lt;CSS id for error explanation&gt;'
              assert_select 'div.&lt;CSS class for field with error&gt;'
      end
  </code></pre>
  
  <p>Code it is testing. Users/new:</p>
  
  <pre><code>&lt;% provide(:title, "sign up") %&gt;
  &lt;h1&gt;Sign up&lt;/h1&gt;
  
  &lt;div class="row"&gt;
      &lt;div class="col-md-6 col-md-offset-3"&gt;
          &lt;%= form_for(@user, url: signup_path) do |f| %&gt;
              &lt;%= render 'shared/error_messages' %&gt;
              &lt;%= f.label :name %&gt;
              &lt;%= f.text_field :name, class: "form-control" %&gt;
  
              &lt;%= f.label :email %&gt;
              &lt;%= f.email_field :email, class: "form-control" %&gt;
  
              &lt;%= f.label :password %&gt;
              &lt;%= f.password_field :password, class: "form-control" %&gt;
  
              &lt;%= f.label :password_confirmation, "Confirmation" %&gt;
              &lt;%= f. password_field :password_confirmation, class: "form-control" %&gt;
  
              &lt;%= f.submit "Create my account", class: "btn btn-primary" %&gt;
  
              &lt;% end %&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Shared/_error_messages:</p>
  
  <pre><code>&lt;% if @user.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
          &lt;div class="alert alert-danger"&gt;
              The form contains &lt;%= pluralize(@user.errors.count, "error") %&gt;.
          &lt;/div&gt;
        &lt;ul&gt;
          &lt;% @user.errors.full_messages.each do |msg| %&gt;
              &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
          &lt;% end %&gt;
        &lt;/ul&gt;
       &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>