title: ruby: unable to use logger with rspec
body: <p>I am trying to add logging to a simple rspec test. I am using Watir to drive Chrome within the spec and this works fine. I am unable to get logs using the "Logger" library. </p>
  
  <p>This is my spec:</p>
  
  <pre><code>require 'rubygems'
  require 'watir-webdriver'
  require 'rspec'
  require 'logger'
  
  describe 'ui tests' do
    let(:browser) { browser ||= Watir::Browser.new :chrome }
  
    let(:log) {
      log = Logger.new(STDOUT)
      log = Logger.new('watir.tests.log', 'daily')
      log.level = Logger::DEBUG
    }
  
    before {
      browser.goto 'http://translate.google.com'
    }
    after { browser.close }
  
    context 'simple tests' do
      it 'simple test' do
        log.info("Running simple test")
        browser.text_field(:id =&gt; "source").set("ost")
  
        # actual test/asserts here
  
      end
    end
  end
  </code></pre>
  
  <p>The problem is that I am unable to call any logging method such as log.info inside the example. I get this error:</p>
  
  <pre><code>Failures:
  
    1) ui tests simple tests simple test
  Failure/Error: log.info("Running simple test")
  NoMethodError:
    undefined method `info' for 0:Fixnum
  </code></pre>
  
  <p>Why is this failing? Is it a scope issue? If I comment out the <code>log.info</code> the spec runs fine. I can use any methods on the "browser" object (for example, the call to browser.text_field) inside the example without a problem.</p>
  
  <p>Where I am going wrong?</p>