Sha256: 4fcdb4f7048c10dbf087cee0681d1e274c159815e8c307212ba4519c81a738df

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

require 'rack'

class APP
  def self.call(env)
    [200, {"Content-Type" => "application/json"}, '{"msg":"Hello Rack!"}']
  end
end

require 'rack/test/poc'
require 'minitest/autorun'

describe 'AppTest' do

  include Rack::Test::Methods

  def app
    APP
  end

  specify 'some rack test!' do

    get '/' #> at this point poc data generated for '/'

    #> bla bla bla some code here

    last_response.body #> '{"msg":"Hello Rack!"}'

  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-test-poc-1.0.0 test/dummy.rb