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

Create minitest generator component #667

Closed
nesquena opened this issue Sep 12, 2011 · 12 comments
Closed

Create minitest generator component #667

nesquena opened this issue Sep 12, 2011 · 12 comments
Assignees
Milestone

Comments

@nesquena
Copy link
Member

We should add a minitest test generator choice, i.e padrino g project demo -t minitest which requires the gem unless its 1.9. If you guys agree lets get this in for 0.10.3 or 0.10.4

@ghost ghost assigned achiurizo Sep 12, 2011
@DAddYE
Copy link
Member

DAddYE commented Sep 14, 2011

@achiu I suggest to target it to the 10.3, you agree? Sinatra 1.3 will be released soon, are u ready?

@achiurizo
Copy link
Member

ready!

@nesquena
Copy link
Member Author

@DAddYE @achiu Pushed a minitest component here: https://github.com/padrino/padrino-framework/tree/minitest_component. Can you guys review and test that branch so we can merge it back in?

@achiurizo
Copy link
Member

@nesquena thanks for the minitest component. I was wondering though about whether it should default use minitest spec or test/unit style. perhaps an option? what do you guys think?

@nesquena
Copy link
Member Author

Yeah I mean there's no easy way to make it an option. It would have to be two separate component choices. Not sure if I want minitest_unit and minitest_spec components. I just went with autorun+spec which is what I think the common case is. Thoughts?

@DAddYE
Copy link
Member

DAddYE commented Sep 26, 2011

I think we can make a default like this:

describe 'foo bar' do
  it 'should do some thing' do
    assert Foo.is_true?
  end
end

So DSL + Asseritions. Bad idea?

@nesquena
Copy link
Member Author

Oh so keep describe/it but switch from .must_equal to assert_equal? I'm ok with that. Kind of a middle ground approach?

@DAddYE
Copy link
Member

DAddYE commented Sep 26, 2011

I think describe / it can be great for 99% of us, but I also think that now assert is much common than must or should. Btw switch from them is quite simple but assert in my mind is more standard.

Im right with both, sometimes I use assert sometimes must I don't really have a preference.

@nesquena
Copy link
Member Author

OK, I agree that describe/it is better in almost all cases. I also don't have a strong preference for assert over must, with a slight edge to assert just because as you said it is more common. @achiu Right now I used must assertion types, can you review the branch and tweak it to use assert instead in the model and controller minitest generators? Or alternatively curious to hear what you think the right "default" is here.

achiurizo added a commit that referenced this issue Sep 27, 2011
@achiurizo
Copy link
Member

switch to use assert/refute assertions instead and merged back to master. closing ticket.

@nesquena
Copy link
Member Author

Awesome, glad to have this closed. Thanks @achiu.

@DAddYE
Copy link
Member

DAddYE commented Sep 27, 2011

Thanks @achiu

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

3 participants