What do folks think about making changes to the default test locations? I would love to see the following changes made: test/units -> test/models test/units/helpers -> test/helpers test/units/lib -> test/lib test/functional -> test/controllers test/functional -> test/mailers test/integration -> test/acceptance I''ve already done this in minitest-rails for Rails 3, but I thought I''d check here before creating a pull request for Rails 4. Here is a blog I blogged on my blog explaining more about why I think this change is good. http://blowmage.com/2012/07/12/rails-tests-placement Thoughts? ~Mike -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
+0.5 :) I''m using minitest-rails on my newer projects and I liked the structure you picked. It makes it easy to add tests for things like serializers (test/serializers), commands, etc. I think this would be a more reasonable choice of naming for new projects. I just don''t know how this is going to impact existing projects and the rest of the ecosystem. Godfrey Sent from my phone On 2012-09-29, at 10:32 AM, Mike Moore <blowmage@gmail.com> wrote:> What do folks think about making changes to the default test locations? I would love to see the following changes made: > > test/units -> test/models > test/units/helpers -> test/helpers > test/units/lib -> test/lib > test/functional -> test/controllers > test/functional -> test/mailers > test/integration -> test/acceptance > > I''ve already done this in minitest-rails for Rails 3, but I thought I''d check here before creating a pull request for Rails 4. > > Here is a blog I blogged on my blog explaining more about why I think this change is good. > > http://blowmage.com/2012/07/12/rails-tests-placement > > Thoughts? > > ~Mike > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
This is similar to rspec structure which I really like. I believe your proposal being less generic and better fitted to the rails use case is a very nice one. One question though, where do routing tests go? On Sep 29, 2012, at 11:59 PM, Godfrey Chan wrote:> +0.5 :) > > I''m using minitest-rails on my newer projects and I liked the structure you picked. It makes it easy to add tests for things like serializers (test/serializers), commands, etc. I think this would be a more reasonable choice of naming for new projects. I just don''t know how this is going to impact existing projects and the rest of the ecosystem. > > Godfrey > > Sent from my phone > > On 2012-09-29, at 10:32 AM, Mike Moore <blowmage@gmail.com> wrote: > >> What do folks think about making changes to the default test locations? I would love to see the following changes made: >> >> test/units -> test/models >> test/units/helpers -> test/helpers >> test/units/lib -> test/lib >> test/functional -> test/controllers >> test/functional -> test/mailers >> test/integration -> test/acceptance >> >> I''ve already done this in minitest-rails for Rails 3, but I thought I''d check here before creating a pull request for Rails 4. >> >> Here is a blog I blogged on my blog explaining more about why I think this change is good. >> >> http://blowmage.com/2012/07/12/rails-tests-placement >> >> Thoughts? >> >> ~Mike >> >> -- >> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.Cumprimentos, Luís Ferreira -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Sep 29, 2012, at 5:17 PM, "Luís Ferreira" <zamith.28@gmail.com> wrote:> One question though, where do routing tests go?/test/routes -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Yes, seems obvious. Just pointing that out. But the changes seem really nice and makes the placing of test files more obvious and semantic. On Sep 30, 2012, at 12:36 AM, Mike Moore wrote:> On Sep 29, 2012, at 5:17 PM, "Luís Ferreira" <zamith.28@gmail.com> wrote: > >> One question though, where do routing tests go? > > /test/routes > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. >Cumprimentos, Luís Ferreira -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
+1. I never saw the point of the existing naming scheme. On Sat, Sep 29, 2012 at 6:39 PM, Luís Ferreira <zamith.28@gmail.com> wrote:> Yes, seems obvious. Just pointing that out. But the changes seem really > nice and makes the placing of test files more obvious and semantic. > On Sep 30, 2012, at 12:36 AM, Mike Moore wrote: > > > On Sep 29, 2012, at 5:17 PM, "Luís Ferreira" <zamith.28@gmail.com> > wrote: > > > >> One question though, where do routing tests go? > > > > /test/routes > > > > -- > > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Core" group. > > To post to this group, send email to rubyonrails-core@googlegroups.com. > > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > > Cumprimentos, > Luís Ferreira > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hey Mike, I''m personally in favor of what you''ve proposed. I''m starting a discussion with other Rails core members about it. In case we decide to accept the changes we should be keeping compatibility with the old schema. Only new apps should be using this and old apps should continue working. We can probably show a message saying that there''s a new directory schema for tests. What do you think?. Will you be able to provide a patch for all that?. Thank you very much for helping ;). -- Santiago Pastorino WyeWorks Co-founder http://www.wyeworks.com Twitter: http://twitter.com/spastorino Github: http://github.com/spastorino On Sat, Sep 29, 2012 at 2:32 PM, Mike Moore <blowmage@gmail.com> wrote:> What do folks think about making changes to the default test locations? I > would love to see the following changes made: > > test/units -> test/models > test/units/helpers -> test/helpers > test/units/lib -> test/lib > test/functional -> test/controllers > test/functional -> test/mailers > test/integration -> test/acceptance > > I''ve already done this in minitest-rails for Rails 3, but I thought I''d > check here before creating a pull request for Rails 4. > > Here is a blog I blogged on my blog explaining more about why I think this > change is good. > > http://blowmage.com/2012/07/12/rails-tests-placement > > Thoughts? > > ~Mike > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
This is probably quite obvious, but I thought I''d point it out anyways. One big advantage of this schema is that there is a one-to-one corresponding between the content of the /app directory and the /test directory. This makes a lot of things very straightforward. For instance, when using guard to do automated testing, this is all you need in your Guardfile: guard ''minitest'', :rubygems => true do watch(%r|^test/minitest_helper\.rb$|) { "test" } watch(%r|^test/(.*)_test\.rb$|) watch(%r|^app/(.*)\.rb$|) { |m| "test/#{m[1]}_test.rb" } end Also, this probably should be configurable, or at least query-able so other plugins/gems/generators can figure where things should be placed in. Godfrey On 2012-09-29, at 8:41 PM, Santiago Pastorino wrote:> Hey Mike, > > I''m personally in favor of what you''ve proposed. I''m starting a > discussion with other Rails core members about it. > In case we decide to accept the changes we should be keeping > compatibility with the old schema. Only new apps should be using this > and old apps should continue working. We can probably show a message > saying that there''s a new directory schema for tests. > What do you think?. Will you be able to provide a patch for all that?. > > Thank you very much for helping ;). > > -- > > Santiago Pastorino > WyeWorks Co-founder > http://www.wyeworks.com > > Twitter: http://twitter.com/spastorino > Github: http://github.com/spastorino > > On Sat, Sep 29, 2012 at 2:32 PM, Mike Moore <blowmage@gmail.com> wrote: >> What do folks think about making changes to the default test locations? I >> would love to see the following changes made: >> >> test/units -> test/models >> test/units/helpers -> test/helpers >> test/units/lib -> test/lib >> test/functional -> test/controllers >> test/functional -> test/mailers >> test/integration -> test/acceptance >> >> I''ve already done this in minitest-rails for Rails 3, but I thought I''d >> check here before creating a pull request for Rails 4. >> >> Here is a blog I blogged on my blog explaining more about why I think this >> change is good. >> >> http://blowmage.com/2012/07/12/rails-tests-placement >> >> Thoughts? >> >> ~Mike >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Sep 29, 2012, at 9:42 PM, Santiago Pastorino <spastorino@gmail.com> wrote:> Hey Mike,Hey Santiago.> I''m personally in favor of what you''ve proposed. I''m starting a > discussion with other Rails core members about it. > In case we decide to accept the changes we should be keeping > compatibility with the old schema. Only new apps should be using this > and old apps should continue working. We can probably show a message > saying that there''s a new directory schema for tests. > What do you think?. Will you be able to provide a patch for all that?.Yep. The minitest-rails project has similar goals and is intended to live side-by-side with existing tests. The biggest issue is the rake tasks, but its certainly doable. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Mike, We decided to do this for Rails 4. Can you go ahead and provide a Pull Request?. Mention me on it and I will merge. Thanks again for putting all this ideas and for minitest-rails :) -- Santiago Pastorino WyeWorks Co-founder http://www.wyeworks.com Twitter: http://twitter.com/spastorino Github: http://github.com/spastorino On Sunday, September 30, 2012, Mike Moore wrote:> On Sep 29, 2012, at 9:42 PM, Santiago Pastorino <spastorino@gmail.com> > wrote: > > > Hey Mike, > > Hey Santiago. > > > I''m personally in favor of what you''ve proposed. I''m starting a > > discussion with other Rails core members about it. > > In case we decide to accept the changes we should be keeping > > compatibility with the old schema. Only new apps should be using this > > and old apps should continue working. We can probably show a message > > saying that there''s a new directory schema for tests. > > What do you think?. Will you be able to provide a patch for all that?. > > Yep. The minitest-rails project has similar goals and is intended to > live side-by-side with existing tests. The biggest issue is the rake > tasks, but its certainly doable. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Sep 30, 2012, at 12:49 PM, Santiago Pastorino <spastorino@gmail.com> wrote:> Mike, > > We decided to do this for Rails 4. > Can you go ahead and provide a Pull Request?. > Mention me on it and I will merge. > > Thanks again for putting all this ideas and for minitest-rails :)Awesome. Will do. Thanks! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hey guys, Is anyone already working on this task? If not, I would like to do it myself. Francesco. On Sunday, September 30, 2012 2:05:06 PM UTC-5, Mike Moore wrote:> > On Sep 30, 2012, at 12:49 PM, Santiago Pastorino <spast...@gmail.com<javascript:>> > wrote: > > > Mike, > > > > We decided to do this for Rails 4. > > Can you go ahead and provide a Pull Request?. > > Mention me on it and I will merge. > > > > Thanks again for putting all this ideas and for minitest-rails :) > > Awesome. Will do. Thanks! >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/LBFlqMd4RmAJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Oct 5, 2012, at 12:20 PM, Francesco Rodriguez <lrodriguezsanc@gmail.com> wrote:> Hey guys, > > Is anyone already working on this task? If not, I would like to do it myself.I''m working on it. Will submit a pull request "soon". ;) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
FYI: https://github.com/rails/rails/pull/7878 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.