Sha256: e2385edf9f356b6e42393763d7894ccd52000cd0734061926759f25fe794e5a0

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

Rack Test POC
=============

### Description

rack/test based poc file generator, this will make you able to export 
any data that traveled through the test, and be able to create poc 
file with that. It is even useful for creating integration test that 
is based on your api endpoints, because the export file will be 
serialized into a yaml file that contain all the endpoints that 
you just tested, and it's inputs and outputs

I my self use for documentation and cooperation purpose with other developers

### Install

#### RubyGems/gem command

  $ gem install rack-test-poc

#### Bundler/Gemfile

  gem 'rack-test-poc'

### example

```ruby

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 README.md