Hi, I have a giant problem that I'm 5 days stuck!!! I have a app:

https://github.com/eltonsantos/locaweb-twitter

But Can't work with tests. Look:

it "Has response HTTP 200" do
      get "/"
      puts last_response.inspect
      expect(last_response).to have_http_status(:success)
    end

In inspect return this:

#<Rack::MockResponse:0x007fbc948c2f50 
@original_headers={"Content-Type"=>"text/html;charset=utf-8", 
"X-Cascade"=>"pass", "Content-Length"=>"459", "X-XSS-Protection"=>"1; 
mode=block", "X-Content-Type-Options"=>"nosniff", 
"X-Frame-Options"=>"SAMEORIGIN"}, @errors="", @body_string=nil, 
@status=404, @header={"Content-Type"=>"text/html;charset=utf-8", 
"X-Cascade"=>"pass", "Content-Length"=>"459", "X-XSS-Protection"=>"1; 
mode=block", "X-Content-Type-Options"=>"nosniff", 
"X-Frame-Options"=>"SAMEORIGIN"}, @chunked=false, 
@writer=#<Proc:0x007fbc948c28c0@/Users/eltonsantos/.rvm/gems/ruby-2.3.3@sinatra/gems/rack-1.6.5/lib/rack/response.rb:30
 
(lambda)>, @block=nil, @length=459, @body=["<!DOCTYPE 
html>\n<html>\n<head>\n  <style type=\"text/css\">\n  body { 
text-align:center;font-family:helvetica,arial;font-size:22px;\n    
color:#888;margin:20px}\n  #c {margin:0 
auto;width:500px;text-align:left}\n  </style>\n</head>\n<body>\n  *<h2>Sinatra 
doesn&rsquo;t know this ditty.</h2>*\n  <img 
src='http://example.org/__sinatra__/404.png'>\n  <div id=\"c\">\n    Try 
this:\n    <pre>get &#x27;&#x2F;&#x27; do\n  &quot;Hello 
World&quot;\nend\n</pre>\n  </div>\n</body>\n</html>\n"]>

How configure sinatra for use with rspec and json??? Serious, I trying 
but I do not know what to do anymore :(

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/1fe40a63-cdee-4cdf-ba4d-f07461e48e33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to