title: Run specs on axslx generated files
body: <p>My goal here is to run specs on files generated by <a href="http://blog.timothyandrew.net/blog/2013/05/01/writing-custom-rspec-matchers/" rel="nofollow">axlsx-rails</a> gem, and use a custom rspec matcher I found <a href="http://blog.timothyandrew.net/blog/2013/05/01/writing-custom-rspec-matchers/" rel="nofollow">here</a>.</p>
  
  <p>In my spec example, I have:</p>
  
  <pre><code>describe Statistic::CompanyTableSetsController do
    login_user # this just for Devise Auth
    it "generates a proper excel sheet" do
      ...
      get "show", format: :xlsx, id: id
      response.content_type.to_s.should eq Mime::Type.lookup_by_extension(:xlsx).to_s
    end
  end
  </code></pre>
  
  <p>But when I run my test, I get :</p>
  
  <pre><code>Failure/Error: response.content_type.to_s.should eq Mime::Type.lookup_by_extension(:xlsx).to_s
  
     expected: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
          got: "text/html"
  </code></pre>
  
  <p>And of course I can't get the worksheet in other spec examples...</p>
  
  <p>Think I miss something here, because in my browser, the Excel sheet is generated normally.</p>
  
  <p>Thanx for your help.</p>