- Corrected gem dependencies so it properly requires RSpec when loaded (thanks to @itay-grudev)
accept_argument
matcher accepts underscored argument names and passes even if the actual argument is camel-cased (khamusa#32 thanks to @TonyArra);have_a_field
matcher accepts.with_deprecation_reason
(khamusa#34 thanks to @TonyArra).
- Fixed issue causing the last release to break expectations against snake_cased fields (fixes khamusa#30).
- Added support to underscored arguments in have_field (khamusa#29 thanks to @makketagg)
- Added graphql-ruby 1.9.x support (thanks to @severin)
- Fixed issue causing
have_a_field(x).of_type(Y)
to fail on fields defined on implemented interfaces that were defined with legacy syntax.
- Support to property and hash_key matchers will be dropped on upcoming releases.
.with_metadata
and.with_property
matchers for fields will be removed on the next release;.accept_arguments
(plural form) will be removed on the next release;.accept_argument
(singular form) receiving a hash with a single or multiple arguments will no longer be supported, useaccept_argument(name).of_type('MyType')
instead.
- Add support for Class-based type definition api (adds support for graphql-ruby v1.8.x). Please note that
.with_metadata
and.with_property
support has been kept but will only work on fields defined using the legacy api. - Implemented `accept_argument(arg_name).of_type('MyType')´ matcher, which returns much clearer error messages when the arguments are not found on the target type.
Changelog fixes.
- (#3, #8) New chainable matchers
with_property
,with_hash_key
andwith_metadata
(Thanks to @marcgreenstock).
- Default Raketask runs rubocop specs as well (Thanks to @marcgreenstock).
- (PR #6) New matchers for interfaces:
expect(...).to implement(interface)
(Thanks to @marcgreenstock).
- (PR #4) New matchers for mutations:
have_an_input_field
andhave_a_return_field
(Thanks to @aaronklaassen).
- Improvements on error messages of have_a_field(...).of_type(...)
- 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.
- New matcher have_field(field_name).of_type(type) for testing types and their fields
- New matcher be_of_type for testing fields
- New matcher accept_arguments for testing fields