[MacRuby] #362: Add Unit Testing and Embed MacRuby to Project Template
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ I'm attaching a new version of the default project template. To test you can copy it to one of the template directories such as : ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/Application/ Differences: - Embed MacRuby target is included by default to easy deployment for first time users - Tests directory has been added for tests - test_stub.rb has been added with a starting test::unit case - Unit Tests target has been added to run the tests - test_suite.rb has been added to load up all tests from the Tests directory. This can easily be made recursive using Dir.glob. -- Ticket URL: <http://www.macruby.org/trac/ticket/362> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by dylan@…): If there's interest I can also port these changes to the other project templates. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:1> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by lsansonetti@…): I just gave it a try, it's awesome! I think we should definitely port the changes to the other templates, but we may first want to go with the main one and iterate on it until we are good. It's always painful to manage Xcode templates so it may be easier if we port the changes all in once. Also, regarding the test stuff, I think Eloy might want to comment, since he's our local test expert :) -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:2> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by dylan@…): :) Good idea on the wait to merge part. I do so hate replicating work. I'm new to Ruby 1.9; looks like test::unit was pulled in favor of minitest and a thin interface layer wrapper around it to provide basic test::unit compatibility. I see a spec.rb in there as well; might be interesting to include a stub for that kind of test as well. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:3> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by eloy.de.enige@…): As commented on the ML, for now I'd say it can go in the template, but on the long run this should be replaced by Rucola's testing support. If you want to use specs, skip the minitest one, you're better of using Bacon. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:4> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: eloy.de.enige@… Type: enhancement | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Changes (by eloy.de.enige@…): * owner: lsansonetti@… => eloy.de.enige@… * priority: blocker => trivial Comment: Actually, after thinking about it a bit more, I'm still on the fence about adding it to the project templates now. Because A it doesn't work correctly yet and we would only be indicating to people that it is supported, which it isn't. And it might be weird for people that we add something and change it a month later… I personally don't have a big problem with the latter issue, but some might. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:5> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: eloy.de.enige@… Type: enhancement | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by eloy.de.enige@…): So, I was gonna apply it as Laurent already tried it and said it worked great, but I'd first like to run some stuff by you: How about changing the test_suite.rb file to run_suite.rb, move it into the Tests dir and use glob like: {{{ Dir.glob(File.expand_path('../**/*_test.rb', __FILE__)).each { |test| require test } }}} And rename the test_stub.rb to stub_test.rb. So invoking the complete suite would be: $ ruby Tests/run_suite.rb Thoughts? -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:6> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: eloy.de.enige@… Type: enhancement | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by dylan@…): I like it. I've attached a version with the changes :) -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:7> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: eloy.de.enige@… Type: enhancement | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by dylan@…): I was playing around with this a bit more and I noticed a bug in the template. Fix attached. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:8> MacRuby <http://macruby.org/>
#362: Add Unit Testing and Embed MacRuby to Project Template ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: eloy.de.enige@… Type: enhancement | Status: closed Priority: trivial | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by eloy.de.enige@…): * status: new => closed * resolution: => fixed Comment: Thanks! Committed in r2723 & r2724. Please double check everything works as expected. -- Ticket URL: <http://www.macruby.org/trac/ticket/362#comment:9> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby