title: Trying to use Regular Expression in RSpec have_selector line
body: <p>I'm brand new to Ruby/Rails/RSpec, and hopefully this is a dumb/simple question.  I'm currently working on writing RSpec tests for our current projet.  What I am am currently doing involves writing a test for displaying a last login time/date on a page.  </p>
  
  <p>What I want to do is just test if the date/time is present in the format we want.  I'm using a regular expression to check for the formatting.  I'm creating the regexp, then trying to use the should have_selector line like so (please excuse the ugly regexp)-</p>
  
  <pre><code>it "should display last login date and time" do
    date_time_regex = /Last Login: [0-9][0-9]-[0-9][0-9]-[0-9][0-9], [0-9][0-9]:[0-9[0-9]]/
    visit root_path
    response.should have_selector("date_time", :content =&gt; date_time_regex)
  end
  </code></pre>
  
  <p>When I try run the test I get the following error-</p>
  
  <pre><code>1) LayoutLinks when signed in should display last login date and time
   Failure/Error: response.should have_selector("date_time", :content =&gt; date_time_regex)
   NoMethodError:
     undefined method `include?' for #&lt;Regexp:0xef2a40&gt;
   # ./layout_links_spec.rb:60:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>So it looks like I can't pass in a regexp, but I'm not sure what to do next?  Thanks in advance for any help!</p>