[katello-devel] Rspec and/or mini-test?

David Davis daviddavis at redhat.com
Fri Mar 8 15:52:59 UTC 2013


I'd be happy to give up Rspec under the condition we can use spec-style minitest tests for when we are writing tests that are not unit tests.

I like being able to use the spec style syntax along with features like nested describes when I am writing scenario or integration tests.

Here's a link for more information about MiniTest::Spec.

http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html

David

----- Original Message -----
> From: "Brad Buckingham" <bbuckingham at redhat.com>
> To: katello-devel at redhat.com
> Sent: Friday, March 8, 2013 10:44:42 AM
> Subject: Re: [katello-devel] Rspec and/or mini-test?
> 
> On 03/08/2013 10:29 AM, Dmitri Dolguikh wrote:
> > We found ourselves in a situation where we use two rather different
> > testing frameworks: rspec and mini-test. Should we migrate to
> > mini-test only? How should we do it? One approach could be not
> > adding
> > any new tests into rspec, and migrate existing rspec tests
> > one-by-one
> > into mini-test.
> >
> > Should we decide to stay with both, I think making factory_girl
> > factories accessible under both suites would be important, as well
> > as
> > updating rspec tests to use the factories...
> >
> >
> > Thoughts/opinions?
> > -d
> >
> > _______________________________________________
> > katello-devel mailing list
> > katello-devel at redhat.com
> > https://www.redhat.com/mailman/listinfo/katello-devel
> 
> I'd be Ok with recommending that new tests be written in minitest vs
> rspec, if the team prefers it.  It is nice to give devs a choice, but
> over time it seems like it would only become more confusing and worse
> to
> manage and maintain if we continue adding in both.  So, I'd recommend
> new tests in minitest.  That said, in rspec there is a test pattern
> in
> place for handling the rbac tests.  We need to have something similar
> in
> minitest; otherwise, those tests will either get missed or need to
> continue to be written in rspec.
> 
> As for all of the existing rspec tests, my 2cents is,
> - if a test requires updates (e.g. as app changes), it could be
> removed
> from rspec and added to minitest
> - if a developer wants to 'on the side' rewrite tests in minitest,
> that's ok, but I wouldn't make that a focus given we have a lot of
> features that should get priority
> 
> cheers,
> Brad
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
> 




More information about the katello-devel mailing list