[MacRuby-devel] Xcode4 - Unit Tests / "Run Script" output

Robert Lowe rob at iblargz.com
Sun Jul 24 12:27:12 PDT 2011


Hi Joshua, 

Thanks for replying about this!

On integration, I think this might be a great point for MacRuby and testing, here's why:

1. Native and MacRuby tests, OCTest is the defacto-standard.

2. Future expansion for debugger support, in the future we might be able to catch exceptions and throw them into a debugger.

3. Possible swapping  of MacRuby testing frameworks (I'd like to start with just porting the ST* assertions and support SenTestCase as transparently as possible. Later on it might be possible to wrap a BDD framework like MacBacon, which would be awesome)

4. Runnable via XCode, no digging in build logs.


Here's a proof of concept I've been working with the past couple of days:

https://github.com/RobertLowe/MacRuby-OCTest-Proof-of-Concept

Here's a screenshot of the run:

http://i.imgur.com/TicrK.png


Let me know if there are any problems running it. I'm game to work on something.

Regards,
- Rob


On 2011-07-24, at 2:49 PM, Joshua Ballanco wrote:

> Hi Rob,
> 
> I wrote that original guide and, I'm sorry to say, I haven't had a chance to update it since Xcode 4 was released. Personally, I'm not a huge fan of OCTest, and I'm not too concerned about having MacRuby based tests run inside the OCTest step. That said, if you have ideas for a simple bridge/wrapper, I'd be more than happy to work with you on getting it to work (I'm rather rusty on OCTest at the moment).
> 
> Also, you may be interested in checking out Eloy's MacBacon and ObjectiveBacon. Might be interesting to figure out integration at that level…
> 
> Cheers,
> 
> Josh
> On Monday, July 18, 2011 at 5:12 PM, Robert Lowe wrote:
> 
>> Hi all,
>> 
>> How are you running your Unit Test in xcode4?
>> 
>> Following the guide here: http://www.macruby.org/recipes/tdd-in-objective-c-with-macruby.html
>> 
>> It went okay,
>> 
>> Scripts output to the build log and in contrast octests output to the console.
>> 
>> The problem I see with this method of running specs/tests is that "Run Script" happens outside of the octest run. And octest is always "blank" because no tests are coded for it.
>> 
>> So has anyone bridged between this? Maybe running macruby inside the octest run? I'm not sure.
>> 
>> Any tips? Any projects I should look at?
>> 
>> Regards,
>> - Rob
>> 
>> 
>> 
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110724/c7b59e5f/attachment.html>


More information about the MacRuby-devel mailing list