Problem with Sinatra, json and Rspec

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=[“\n\n\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 \n\n\n

Sinatra doesn’t know this ditty.

\n \n <div id="c">\n Try this:\n
get '/' do\n  "Hello World"\nend\n
\n \n\n\n”]>

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

No test with rspec work :frowning:

someone?

Maybe you want the Sinatra mailing list instead of the Rails mailing list?

Sinatra is a gem of ruby, I’m on the correct list. Will you help me or will you just keep talking things that have nothing to do?

First, you are asking for help, be more polite. Second you are in the wrong list. This list is about rails, Sinatra is another framework. Please, try to post in the right list first.

Interesting, I was the one to post doubts about it? I do not think so:

https://groups.google.com/forum/#!searchin/rubyonrails-talk/sinatra|sort:relevance

I asking for help and I didnt find the correct list and active, you know then? And about education I think if you do not want to help just do not talk. Save time and avoid stress. Because there is always time to rebuke, but to help, is not there?

You are on the Rails list. Rails is also a gem of Ruby. And no I won’t help anyone with an arrogant attitude like that.

People who are asking for help shouldn't be acting arrogant. You're not entitled to help.

I'd encourage you to either:

- Search Stackoverflow.com (search before you ask) - Actually try googling or even better looking at the sinatra site: http://www.sinatrarb.com -- Oh look a slack for Sinatra...where you can get help and it's on topic: http://sinatra-slack.herokuapp.com/