Skip to content
New issue

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

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

Already on GitHub? # to your account

Convert :field_name to 'fieldName' automaticallly #28

Closed
yagudaev opened this issue Nov 19, 2019 · 1 comment · Fixed by #29
Closed

Convert :field_name to 'fieldName' automaticallly #28

yagudaev opened this issue Nov 19, 2019 · 1 comment · Fixed by #29

Comments

@yagudaev
Copy link

First, of, thank you for the gem :). It reminds me the joy of Shoulda, which is an excellent little gem.

I have a small request, is it possible to automatically change the casing to camel case?

Instead of

# this already works, but not very rubyish
it { is_expect.to have_field(:isPublished) }
# what if we allow for this
it { is_expect.to have_field(:is_published) }
@khamusa
Copy link
Owner

khamusa commented Nov 26, 2019

Hello @yagudaev! I think this would be a nice addition, but I think this behaviour should exist on an opt-in basis. I'll gladly accept a PR, would you be willing to work on this?

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

Successfully merging a pull request may close this issue.

2 participants