tomas-stefano / infinity_test

Continuous testing and a alternative to Autotest and Guard
http://github.com/tomas-stefano/infinity_test
MIT License
217 stars 12 forks source link

Support Rails applications #9

Closed tomas-stefano closed 13 years ago

tomas-stefano commented 13 years ago

The Infinity Test don't do anything special for Rails apps.

I'll support in the next version.

Thanks =D

tomas-stefano commented 13 years ago

Any Ideas/sugestions are welcome =-)

Cheers

doabit commented 13 years ago

hi.i hvae created an branch to support rails and other framework ,but not perfection ,i plan to make it can work like autotest,,,,i hope it can help you

tomas-stefano commented 13 years ago

Awesome! =] Help me a lot! After finish the Bundler feature, I'll merge.

Good job! =D

doabit commented 13 years ago

Hi.i am glad it can help you .I have not completed it .i plan to complete it in few days!

tomas-stefano commented 13 years ago

Try to talk with this user repo http://github.com/seenmyfate/infinity_test

Appears that both guys try to add Rails funcionality to InfinityTest. When is complete send me a pull request and I'll glad to merge this feature.

Great work, guys =]

doabit commented 13 years ago

Hi.I found the rspec color can not work .what about you?

tomas-stefano commented 13 years ago

Hi. I don't understand what you saying here. If you saying about the rspec color, I'll investigate this. The issue is here http://github.com/tomas-stefano/infinity_test/issues#issue/5

doabit commented 13 years ago

Sorry for my weak english ,yes I use the old version of infinity_test it can work ,but after i updated it ,i found it can not work..i am finding the issue..By the way ,i know little of bacon, i think that i add the rails support will not work well with it ,sorry!

tomas-stefano commented 13 years ago

No problem =]. It's a bug because the Rspec 2 oficial change the way they use to print colors. Test::Unit don't print colors too. Can you help me in this?

Thanks

doabit commented 13 years ago

Hi..I finished the rails supprot ! http://github.com/doabit/infinity_test/tree/add-app-framework The Rspec 2 release changed ? i hvae not notice that. when i use rspec 2 beta22,it can work well few days ago. I don't know how to make it work nowll

tomas-stefano commented 13 years ago

woot! Awesome Job! =] I'll merge!

Thanks =D

tomas-stefano commented 13 years ago

Merged in http://github.com/tomas-stefano/infinity_test/commit/620f313d1afe0a8f037d2433dad111bdfb6f9d52

About the Colors I don't know for sure what happening, but I'll investigate this.

Thanks again =)

doabit commented 13 years ago

Hi .I am glad it can help you . I only know rails ,so other frameworks i can't add.
About the colors ,i am not sure if it is because of refactoring all the test libraries. As i know ,before refactoring the test libraries,It can work!

tomas-stefano commented 13 years ago

The colors is a problem that really bothers me. But when I have time I'll find this. Before I close this issue I'll add Heuristics class and create a way for users put their own "mappings" (This will include moving all the mappings to there)

Thanks again for this great work

mrrooijen commented 13 years ago

How is the support for Rails (3) going m8? I see stuff has happened since we last talked about it. Anything production ready yet? :)

tomas-stefano commented 13 years ago

In the master branch has total support for Rails apps, BUT to you customize the paths that you want monitor too, I'm working on it.

For example:

infinity_test --rails --rspec

Works and see this paths:

    configuration_pattern = "^config/application.rb"
    routes_pattern = "^config/routes\.rb"
    lib_pattern  = "^lib/*/(.*)\.rb"
    if using_test_unit?
      @test_pattern = "^test/*/(.*)_test.rb"
      @fixtures_pattern = "^test/fixtures/(.*).yml"
    else
      @test_pattern = "^spec/*/(.*)_spec.rb"
      @fixtures_pattern = "^spec/fixtures/(.*).yml"
    end
    @controllers_pattern = "^app/controllers/(.*)\.rb"
    @models_pattern = "^app/models/(.*)\.rb"

But if you add extra patterns to monitor and run something, today you can't, but I'm working on it.

If you want extra patterns to watch you can sse the EXPERIMENTAL feature of #heuristics method.

  heuristics do
      add('spec/spec_helper.rb') do
         run(:all => :files)
      end
  end

But this in master branch and yesterday I see bugs in this and I'm working on it right now.

mrrooijen commented 13 years ago

seems to be working! awesome man. I'm really digging this tool. Using it on a new open source project I'll be releasing too long from now. Works perfectly when running against ree and 1.9.2.

Thanks for providing such a nice util. :)

tomas-stefano commented 13 years ago

I'm glad that you are using this tool. =]

I'll bump a version very soon =-)

w00t!

tomas-stefano commented 13 years ago

Now it's done!

To see all the patterns that InfinityTest will watchr just run:

$ infinity_test --heuristics --rails

And you will see all the patterns that will monitor.

Works very well!

mrrooijen commented 13 years ago

awesome stuff m8! :D

tomas-stefano commented 13 years ago

Thanks! And thanks to @doabit This work was awesome!

=]