title: refactor the rspec tests
body: <p>I have written a unit tests as below.</p>
  
  <pre><code>describe Youtube::Metadata do
    let(:subject) { SampleMetadata.from_text(open(url)) }
    context "when url is passed" do
      let(:url) { "http://www.sample.com" }
  
      describe "It should return all values from the site" do
        its(:id) { should eql "234" }
        its(:url) { should eql "www.sample.com" }
      end
  
      context "Given a html file with id property" do
        let(:html) { File.join(PAGES, 'youtube', 'sample1.html') }
        let(:subject) { Youtube::Metadata.from_text(File.read(html)) }
  
        it "should return unique value from id property" do
          subject.unique_id.should eql "65155c6e-ba11-42fc-bb91-53520176d2a8"
        end
      end
  
      context "Given a html file with rel:canonical property" do
        let(:html) { File.join(PAGES, 'youtube', 'sample2.html') }
        let(:subject) { Youtube::Metadata.from_text(File.read(html)) }
  
        it "should return unique value from rel=canonical content property" do
          subject.unique_id.should eql "65155c6e-ba11-42fc-bb91-53520176d2a8"
        end
      end
    end
  end
  </code></pre>
  
  <p>I need to refactor it so that I dont have to repeat the below statement in each and every tests cases.</p>
  
  <pre><code>let(:subject)   { Youtube::Metadata.from_text(File.read(html))
  </code></pre>
  
  <p>I tried it with before block but it didn't work.  </p>
  
  <blockquote>
    <p>Actually the first context we pass url and the second set of context
    we pass filename. Also I am not sure whether I need to make it as a
    single context (which is passing file name contexts, ie. last two) and describe it.</p>
  </blockquote>
  
  <p>What would be the right way to do it??</p>