title: Basic RSpec issue - method runs but tests fail
body: <p>Given all the hype over TDD, I decided it was time to dig in and add that to the list of things to study.  I'm running into an issue, and I'm 100% certain it's just a function of something being wrong with my tests in RSpec.  I'm still brand new to RSpec, so I'm having trouble figuring it out... my method works just fine, but the test for the method does not.</p>
  
  <p><strong>Method Code</strong> (I know I can refactor this A LOT. This is one of the first Ruby programs I wrote awhile back, which explains the ugliness)</p>
  
  <pre><code>def caesar_cipher(string,offset)
     string=string.to_s
     offset=offset.to_i
  
     cipher=[]
     string.each_byte do |i| 
         #capital letters
         if (i&gt;64 &amp;&amp; i&lt;91)
             if (i+offset)&gt;90
                 cipher &lt;&lt; (i+offset-26).chr
             else
                 cipher &lt;&lt; (i+offset).chr
             end
         elsif (i&gt;96 &amp;&amp; i&lt;123)
              if (i+offset)&gt;122
                  cipher &lt;&lt; (i+offset-26).chr
              else
                  cipher &lt;&lt; (i+offset).chr
              end
          else
              cipher &lt;&lt; i.chr
         end
      end
    cipher=cipher.join('')
    puts "The encrypted string is: #{cipher}"
  end
  puts "Enter the string you'd like to encrypt"
  string=gets.chomp
  puts "Enter the offset you'd like to use"
  offset=gets.chomp
  caesar_cipher(string,offset)
  </code></pre>
  
  <p><strong>Test Code</strong> (Just for one generic case, <em>all lower case input</em>)</p>
  
  <pre><code>require './caesarCipher.rb'
  
  describe "caesar_cipher"  do
      it 'should handle all lower case input' do
          caesar_cipher("abcdefg", 3).should == "defghij"
      end     
  end
  </code></pre>
  
  <p><strong>Method output:</strong></p>
  
  <pre><code>$ ruby caesarCipher.rb 
  Enter the string you'd like to encrypt
  abcdefg
  Enter the offset you'd like to use
  3
  The encrypted string is: defghij
  </code></pre>
  
  <p><strong>Test Output:</strong></p>
  
  <pre><code>$ rspec spec/caesar_cipher_spec.rb 
  Enter the string you'd like to encrypt
  Enter the offset you'd like to use
  The encrypted string is: require './caesarCipher.rb'
  The encrypted string is: defghij
  F
  
  Failures:
  
    1) caesar_cipher should handle all lower case input
       Failure/Error: caesar_cipher("abcdefg", 3).should == "defghij"
         expected: "defghij"
              got: nil (using ==)
       # ./spec/caesar_cipher_spec.rb:5:in `block (2 levels) in &lt;top (required)&gt;'
  
  
  Finished in 0.00542 seconds (files took 0.14863 seconds to load)
  1 example, 1 failure
  
  Failed examples:
  
  rspec ./spec/caesar_cipher_spec.rb:4 # caesar_cipher should handle all lower case input
  </code></pre>
  
  <p>Any help on why the tests are failing?  Judging by the output it looks like it's running it twice or something in the tests.</p>