title: What is double method in rspec for?
body: <p>It is stated in rspec doc that I should use <code>double</code> method in order to create test double.
  But I can see that it works perfectly ok even if I don't use <code>double</code>. Is there anything wrong with not using <code>double</code>? Also if I'm not using double how <code>MyClass</code> gets <code>stub</code> and other rspec methods? Are they available for all objects when running in rspec?</p>
  
  <pre><code>require 'spec_helper'
  
  class MyClass
  
      def self.run
          new.execute
      end
  
      def execute
          'foo'
      end
  
  end
  
  describe MyClass do
  
      it 'should stub instance method' do
          obj = MyClass.new
          obj.stub(:execute).and_return('bar')
          obj.execute.should == 'bar'
      end
  
      it 'should stub class method' do
          MyClass.stub(:run).and_return('baz')
          MyClass.run.should == 'baz'
      end
  
  end
  </code></pre>