Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test resolution with property #3

Closed
khamusa opened this issue Feb 6, 2017 · 2 comments
Closed

Test resolution with property #3

khamusa opened this issue Feb 6, 2017 · 2 comments

Comments

@khamusa
Copy link
Owner

khamusa commented Feb 6, 2017

Add an easy way to test the usage of property: field :public, types.Boolean, property: :is_public

@khamusa khamusa changed the title Test resolution with different attribute Test resolution with property Feb 6, 2017
@marcgreenstock
Copy link
Contributor

I'll take a stab at this.

how will something like this work?

it { is_expected.to have_a_field(:public).with_property(:is_public) }

I think it should also be capable of matching other options too, like hash_key and metadata.

it { is_expected.to have_a_field(:myThing).with_hash_key(:my_thing).with_metadata(foo: :bar, baz: true) }

@khamusa
Copy link
Owner Author

khamusa commented Jul 26, 2017

Nice! This looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants