title: How to test method with `rand` in Cucumber?
body: <p>I have a page which either returns "No match." or one of the model objects names.<br>
  What is the best way to test it with Cucumber? Should I stub rand in <code>Given</code> step or should I provide something like <code>page has either a or b</code>? Or maybe I should provide <code>rand</code> parameters in scenarion outline parameter, use this parameter in <code>Given</code> step and use the second outline column to check the result?</p>
  
  <p><strong>UPDATE:</strong> <code>cookies</code> controller example in the best traditions of Cookie Monster:</p>
  
  <p><strong>cookie_controller.rb</strong></p>
  
  <pre><code>  def random_cookie
      if rand(5) == 0 do
        cookie = Cookie.offset(rand(Cookie.count)).first
        response =  "You got 10 free #{cookie.type} cookies for your purchase!"
      else
        response = "Sorry, no cookies left :'("
      end
      respond_to do |format|
          format.json { render json: { response: response } }
    end
  </code></pre>
  
  <p><strong>find_cookie.feature</strong></p>
  
  <pre><code>Scenario: Looking for cookie
      When I click "find"
      Then I should see "You got 10 free" or "Sorry, no cookies left :'("
  </code></pre>
  
  <p>How would <code>Then I should see "You got 10 free" or "Sorry, no cookies left :'("</code> step look?
  I've tried something like</p>
  
  <pre><code>  (page.should have_content "You got 10 free") || (page.should have_content "Sorry, no cookies left :'(" 
  </code></pre>
  
  <p>But it didn't work.</p>