Skip to content

Commit

Permalink
Release v0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
khamusa committed May 10, 2017
1 parent 2b437eb commit 3731774
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@

### Bug fixes

## 0.5.0 (May 10, 2017)

### New features

- (PR #4) New matchers for mutations: `have_an_input_field` and `have_a_return_field` (Thanks to @aaronklaassen).

## 0.4.0 (Feb, 2017)

### New features

- Improvements on error messages of have_a_field(...).of_type(...)

### Bug fixes

- Fixed a bug preventing proper type checking when using matchers in the form have_a_field(fname).of_type(types.X). The bug would not happen when providing the type expectation as a string, only when using the GraphQL constants.

## 0.3.0 (Sep 16, 2016)

### Breaking changes
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ gem 'rspec-graphql_matchers'
## Usage

The matchers currently supported are:
- `expect(graphql_type).to have_a_field(field_name).that_returns(valid_type)`
- `expect(graphql_field).to be_of_type(valid_type)`
- `expect(graphql_field).to accept_arguments(hash_of_arg_names_and_valid_types)`
- `expect(a_graphql_object).to have_a_field(field_name).that_returns(valid_type)`
- `expect(a_mutation_type).to have_a_return_field(field_name).returning(valid_type)`
- `expect(a_mutation_type).to have_an_input_field(field_name).of_type(valid_type)`
- `expect(a_field).to be_of_type(valid_type)`
- `expect(an_input).to accept_arguments(hash_of_arg_names_and_valid_types)`
- `expect(an_input).to accept_arguments(hash_of_arg_names_and_valid_types)`

Where a valid type for the expectation is either:
- A `GraphQL::ObjectType` object (ex: `types.String`, `!types.Int`, `types[types.Int]`, or your own)
Expand Down Expand Up @@ -137,8 +140,6 @@ For better fluency, `accept_arguments` is also available in singular form, as

## TODO

- Setup CI and integrate w/codeclimate
- Setup codeclimate / CI badges
- New matchers!

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/graphql_matchers/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Rspec
module GraphqlMatchers
VERSION = '0.3.1'.freeze
VERSION = '0.5'.freeze
end
end

0 comments on commit 3731774

Please sign in to comment.