Sha256: 43290b1fdcd113f5d869d92199e933c8e9bf81c347ce9c45f961bfeb8f046d4f

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

# Fitting

[![Build Status](https://travis-ci.org/funbox/fitting.svg?branch=master)](https://travis-ci.org/funbox/fitting)

This gem will help to make your tests according to the documentation for the API.

When writing tests, you can be sure that the implement API in accordance with documentation on API Blueprint.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'fitting'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install fitting

## Usage

In your `spec_helper.rb`:

```ruby
config.include JSON::SchemaMatchers
```

This gem takes a simplified format json convert from API Blueprint which we have called API Tomogram.

Use gem [tomograph](https://github.com/funbox/tomograph)

```ruby
  Fitting.configure do |config|
    config.tomogram = 'tomogram.json'
  end

```

You can then write tests such as:

```ruby
 expect(response).to match_response
```

If you want check all tests:

```ruby
config.after(:each, :type => :controller) do
  expect(response).to match_response
end
```

## Config

### crash_not_implemented_response

Default true.

## Report

Autogenerate `report_request_by_response.yaml` and `report_response.yaml reports`.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/funbox/fitting. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fitting-1.2.0 README.md