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

RSpec metadata :type for code generators #844

Merged
merged 1 commit into from Oct 16, 2017

Conversation

Projects
None yet
4 participants
@unhappychoice
Contributor

unhappychoice commented Oct 10, 2017

Like rspec-rails, I added type tags to rspec templates which is generated by hanami generate command.

I think users can include shared_contexts, shared_examples or helpers, by using this tag.

@davydovanton

This comment has been minimized.

Member

davydovanton commented Oct 10, 2017

I like this idea 👍
In future we can update rspec-hanami for load only type specific matchers.
@hanami/core WDYT?

@AlfonsoUceda

This comment has been minimized.

Member

AlfonsoUceda commented Oct 10, 2017

@unhappychoice thanks for this PR, I agree too, I think it's useful to provide a foundation of rspec tags

@jodosha

@unhappychoice Thanks for this feature. As all the new features must target the develop branch.

It's not a nitpick decision, but because we rewrote the code generators from 1.0 (master) and 1.1 (develop), this PR won't be compatible with the upcoming 1.1.


I'm changing the target branch for this PR from master to develop, but I need you to rewrite this feature.

I'm sorry for the misunderstanding, we'll make it clear how to contribute to the framework. 🐈

@jodosha jodosha changed the base branch from master to develop Oct 10, 2017

@unhappychoice

This comment has been minimized.

Contributor

unhappychoice commented Oct 10, 2017

Good to know that. 👍
I wiil make the branch based on develop branch 😄

@unhappychoice

This comment has been minimized.

Contributor

unhappychoice commented Oct 10, 2017

BTW, which do you like to use type: :action or type: :controller for an action class ?
I'm currently using type: :action, but :controller also sounds good 👀

What do you think?

@davydovanton

This comment has been minimized.

Member

davydovanton commented Oct 10, 2017

@unhappychoice I think :controller will more understandable 🤔

@AlfonsoUceda

This comment has been minimized.

Member

AlfonsoUceda commented Oct 10, 2017

IMO we shouldn't use controllers, we don't have controller word in hanami we use actions, so I think action is ok. cc @jodosha

@jodosha jodosha self-assigned this Oct 16, 2017

@jodosha jodosha added the enhancement label Oct 16, 2017

@jodosha jodosha added this to the v1.1.0 milestone Oct 16, 2017

@jodosha

This comment has been minimized.

Member

jodosha commented Oct 16, 2017

@unhappychoice This looks good now. Merging 👍

@jodosha jodosha merged commit 9077dee into hanami:develop Oct 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jodosha jodosha changed the title from Add type tags to rspec templates to RSpec metadata :type for code generators Oct 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment