netzke / netzke-core

Framework for Sencha Ext JS + Ruby on Rails client-server components
http://netzke.org
Other
263 stars 77 forks source link

Rake tasks to simplify testing. #51

Closed allomov closed 11 years ago

allomov commented 11 years ago

This tasks allow to prepare test application and to run tests with rake test command. I removed unit tests as they was deprecated. Also I added /tasks folder for develop rake tasks. Also I edited Rakefile to load this rake tasks.

mxgrn commented 11 years ago

Thanks, it's a very nice addition! A few issues and comments:

1) ➡ netzke-core (remotes/allomov/test_tools) rake test:prepare --with-extjs invalid option: --with-extjs

2) Shouldn't rake test depend on rake test:check?

3) Can we get rid of rvm whatsoever? (not using it in latest master)

4) Can you merge in master?

allomov commented 11 years ago

Thanks for comments @nomadcoder. Pay attention that I've removed unit tests as they seemed to be deprecated. Will merge with master and fix issues you've mentioned.

allomov commented 11 years ago

Seems there is several ways to add options to rake task. Currently you need to run it such way rake test:prepare with-extjs, without double dash before option --. Double dash (--) is treated as option for rake command.

Last argument for rake is checked with regexp, so you can also run rake test:prepare with-extjs-please or something in this way.

But the default way of specifying rake tasks option require brackets like rake test:prepare[with-extjs].

What do you think about this options @nomadcoder ? Can we go with command like rake test:prepare with-extjs ?

mxgrn commented 11 years ago

I would better suggest asking the user interactively whether they need us to download extjs in the run of task:prepare, or ask them to run test:download_extjs or sym-link extjs manually.

Sent from my iPhone

On 28 dec. 2012, at 00:05, "A.S. Lomoff" notifications@github.com wrote:

Seems there is several ways to add options to rake task. Currently you need to run it such way rake test:prepare with-extjs, without double dash before option --. Double dash (--) is treated as option for rake command.

Last argument for rake is checked with regexp, so you can also run rake test:prepare with-extjs-please or something in this way.

But the default way of specifying rake tasks option require brackets like rake test:prepare[with-extjs].

What do you think about this options @nomadcoder ? Can we go with command like rake test:prepare with-extjs ?

— Reply to this email directly or view it on GitHub.

allomov commented 11 years ago

@nomadcoder seems to be done. Currently rake test:prepare asks permission to install extjs if test/core_test_app/public/extjs doesn't exists. Also I've added some colors to console output. You are welcome to see how it works.

mxgrn commented 11 years ago

I suggest a few minor improvements.

After I run rake test:check, it says I need to install extjs and how I can do that. I think it should also mention that I may just symlink it (I know, test:prepare says that, but if I haven't read README, I probably don't yet know about test:prepare).

After I symlink it and run test:check again, it says that I'm missing the .yml file, but offers no solution - it's a pity, because it's there: you should probably mention rake test:prepare earlier. Maybe just offer it instead of test:check, because test:check is just confusing at the moment (because it only complaints).

allomov commented 11 years ago

@nomadcoder can you check it now ?

mxgrn commented 11 years ago

Excellent, thanks! Do you mind adding this to basepack, too?

allomov commented 11 years ago

:christmas_tree: Happy new year. And you are welcome. Will add this to basepack.

allomov commented 11 years ago

Will you add it to docs ? I don't clearly understand where we should place information about this rake tasks. Does this link suits https://github.com/netzke/netzke/wiki/Test-apps-as-source-of-examples ?

allomov commented 11 years ago

Also I thought that we can use Netzke::Core.ext_uri options from settings to load extjs library. What do you think about it ?

mxgrn commented 11 years ago

Yes, I did this all already: https://github.com/netzke/netzke-core/commit/bce271e63d200f1b205a6e9fb04c7301d3a183b2 and https://github.com/netzke/netzke-core/commit/b6d525a007545c0b30a2fbddc8bcd37e5fc9df32