<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Can't see nothing but the source code &#187; Ruby</title>
	<atom:link href="http://codeforfun.wordpress.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeforfun.wordpress.com</link>
	<description>Java development with an iPhone touch pad for the Atari 2600 from an urban hip-hop perspective</description>
	<lastBuildDate>Wed, 09 Dec 2009 01:51:25 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='codeforfun.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/8d21f8fd8dcc021adcd46592bfbddcda?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Can't see nothing but the source code &#187; Ruby</title>
		<link>http://codeforfun.wordpress.com</link>
	</image>
			<item>
		<title>Ruby mock objects drop parameters</title>
		<link>http://codeforfun.wordpress.com/2008/11/10/ruby-mock-objects-drop-parameters/</link>
		<comments>http://codeforfun.wordpress.com/2008/11/10/ruby-mock-objects-drop-parameters/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 22:34:44 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby iPhone Testing]]></category>

		<guid isPermaLink="false">http://codeforfun.wordpress.com/?p=607</guid>
		<description><![CDATA[Maybe it&#8217;s me but it sure seems like Ruby mocks are dropping the parameters passed in from Objective-C. I&#8217;m about to give up on this venture into RSpec for iPhone controller code development. In my mind I see it as a huge possibility and I&#8217;m willing to give it a few more shots before I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=607&subd=codeforfun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Maybe it&#8217;s me but it sure seems like Ruby mocks are dropping the parameters passed in from Objective-C. I&#8217;m about to give up on this venture into RSpec for iPhone controller code development. In my mind I see it as a huge possibility and I&#8217;m willing to give it a few more shots before I wave the white flag. Here&#8217;s what I observed so far. (Keep in mind this is coming from a guy who just learned Objective-C, XCode, Ruby, and RubyCocoa reading Apple docs in the shower this morning!) If I call into a Ruby mock passing an int primitive directly from Objective-C while running under RSpec on the 10th day of the 11th month with 3/4th of my coffee mug occupied with the ol&#8217; black magic juice (sorry but from my mobile experience it&#8217;s definitely important to set the stage listing all of your environment variables and making sure the stars are all aligned&#8230;) then I get a program crash. If I instead pass an NSNumber object wrapping the int then the parameter is silently ignored. If I call into a simple Ruby object defined inline in the spec then the parameter seems to come through just fine. If I then wrap the Ruby Mock with my own crude inlined mock passing the value from ObjC through my mock and into the Ruby Mock then all is right with the world&#8230; abusive husbands across America stop beating their wives while they join hands and sing Koom-by-ya&#8230; aggressive drivers let you over in heavy traffic, and the DOW jumps up 200 points. To see what I mean, here&#8217;s the updated spec code from my earlier posting:</p>
<p><strong>bowling_controller_spec.rb</strong></p>
<p>require File.dirname(__FILE__) + &#8216;/test_helper&#8217;</p>
<p>require &#8220;BowlingController.bundle&#8221;<br />
OSX::ns_import :BowlingController<br />
OSX::ns_import :BowlingProtocol</p>
<p>include OSX</p>
<p>class MyMock<br />
  attr_accessor :delegate<br />
  def roll(num)<br />
    puts &#8220;Number is #{num}&#8221;<br />
    puts &#8220;Calling delegate #{@delegate}&#8230;&#8221;<br />
    @delegate.roll(num)<br />
    puts &#8220;Done with delegate&#8230;&#8221;<br />
  end<br />
end</p>
<p>describe BowlingController do<br />
  before(:each) do<br />
    @controller = BowlingController.new<br />
    @bowling = mock(&#8216;BowlingProtocol&#8217;)<br />
    @text_field = mock(&#8216;Pins&#8217;)<br />
    @text_field.stub!(:intValue).and_return(10)<br />
    @controller.pins = @text_field<br />
  end</p>
<p>  it &#8220;should roll a ball&#8221; do<br />
    @controller.roll<br />
  end</p>
<p>  it &#8220;should roll a ball and get the value from the pins outlet&#8221; do<br />
    @text_field.should_receive(:intValue).and_return(0)<br />
    @controller.roll<br />
  end</p>
<p>  it &#8220;should be an OSX::NSObject&#8221; do<br />
    @controller.is_a?(OSX::NSObject).should == true<br />
  end</p>
<p>  it &#8220;should have an outlet to a bowling object&#8221; do<br />
    @controller.bowling = @bowling<br />
  end</p>
<p>  it &#8220;should send the pin value to the bowling object&#8221; do<br />
    mock = MyMock.new<br />
    puts &#8220;Setting delegate to #{@bowling}&#8221;<br />
    mock.delegate = @bowling<br />
    puts &#8220;Now passing mock into real code&#8230;&#8221;<br />
    @controller.bowling = mock<br />
    # @controller.bowling = @bowling<br />
    @bowling.should_receive(:roll).with(NSNumber.numberWithInt(10))</p>
<p>    @controller.roll<br />
  end<br />
end</p>
<p>I updated the controller to use a protocol:<br />
<strong>BowlingController.h</strong></p>
<p>//<br />
//  BowlingController.h<br />
//  BowlingController<br />
//<br />
//  Created by FIXME on 2008-11-10.<br />
//  Copyright 2008 FIXME. All rights reserved.<br />
//</p>
<p>#import <Foundation/Foundation.h></p>
<p>@class UITextField;<br />
@protocol BowlingProtocol;</p>
<p>@interface BowlingController : NSObject {<br />
	UITextField* pins;<br />
	id <BowlingProtocol> bowling;<br />
}<br />
@property (nonatomic, retain) UITextField* pins;<br />
@property (nonatomic, retain) id <BowlingProtocol> bowling;</p>
<p>-(void) roll;<br />
@end</p>
<p><strong>bowling_controller_spec.rb</strong></p>
<p>//<br />
//  BowlingController.h<br />
//  BowlingController<br />
//<br />
//  Created by FIXME on 2008-11-10.<br />
//  Copyright 2008 FIXME. All rights reserved.<br />
//</p>
<p>#import &#8220;BowlingController.h&#8221;<br />
#import &#8220;BowlingProtocol.h&#8221;</p>
<p>@implementation BowlingController<br />
@synthesize pins;<br />
@synthesize bowling;</p>
<p>-(void) roll{<br />
	int val = [self.pins intValue];<br />
	[self.bowling roll:[NSNumber numberWithInt:10]];<br />
}</p>
<p>@end</p>
<p>// This initialization function gets called when we import the Ruby module.<br />
// It doesn&#8217;t need to do anything because the RubyCocoa bridge will do<br />
// all the initialization work.<br />
// The rbiphonetest test framework automatically generates bundles for<br />
// each objective-c class containing the following line. These<br />
// can be used by your tests.<br />
void Init_BowlingController() { }</p>
<p><strong>BowlingProtocol.h</strong></p>
<p>@protocol BowlingProtocol<br />
-(void) roll:(NSNumber*)pins;<br />
@end</p>
<p>More on this later as I explore&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeforfun.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeforfun.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeforfun.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeforfun.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeforfun.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeforfun.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeforfun.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeforfun.wordpress.com/607/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeforfun.wordpress.com/607/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeforfun.wordpress.com/607/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=607&subd=codeforfun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://codeforfun.wordpress.com/2008/11/10/ruby-mock-objects-drop-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11e7597f889f569d804b6f8c79e60e6a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Cliff</media:title>
		</media:content>
	</item>
		<item>
		<title>The Backward Guide to Ruby Cocoa</title>
		<link>http://codeforfun.wordpress.com/2008/10/04/the-backward-guide-to-ruby-cocoa/</link>
		<comments>http://codeforfun.wordpress.com/2008/10/04/the-backward-guide-to-ruby-cocoa/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 18:14:13 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby iPhone Testing]]></category>
		<category><![CDATA[RubyCocoa]]></category>

		<guid isPermaLink="false">http://codeforfun.wordpress.com/?p=496</guid>
		<description><![CDATA[First pretend you&#8217;re an Objective C professional and jump into iPhone development. (It helps to have absolutely no experience at this step.) Next, act over zealous about Test Driven Design and find the only unit testing framework that&#8217;ll half run against an iPhone project, one that just happens to be implemented in Ruby. Throw in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=496&subd=codeforfun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First pretend you&#8217;re an Objective C professional and jump into iPhone development. (It helps to have absolutely no experience at this step.) Next, act over zealous about <a href="http://codeforfun.wordpress.com/2007/10/09/i-dont-care-about-test-coverage/">Test Driven Design</a> and find the only unit testing framework that&#8217;ll half run against an iPhone project, one that just happens to be implemented in Ruby. Throw in a deadline just for fun You now have a recipe for achieve great feats in all things Ruby/Cocoa related and can now complain to your coworkers how stoopid Ruby is because it can only seem to intermittently find your method that is OBVIOUSLY defined on an objective C class you wrote moments ago. </p>
<p>Dumb Ruby programmers! How can anybody claim this technology is superior? Who cares that you didn&#8217;t read the documentation? Didn&#8217;t <a href="http://www.joelonsoftware.com">Joel</a> say somewhere that <a href="http://www.joelonsoftware.com/uibook/chapters/fog0000000062.html">users don&#8217;t read docs?</a> Why can&#8217;t this stuff be easy enough to just pick up and use out of the box? After all if this were Java or Groovy you&#8217;d be finished by now!</p>
<p>Mumble a few more obscenities or discouraging words of condemnation toward the ultimately inferior platforms written by those who label themselves Rubyists or Cocoaists or whatever and then <a href="http://www.google.com/search?client=safari&amp;rls=en-us&amp;q=ruby+cocoa+bridge&amp;ie=UTF-8&amp;oe=UTF-8">Google the thing you&#8217;re trying to do.</a> What&#8217;s that <a href="http://rubycocoa.sourceforge.net/HowDoesTheBridgeWork">towards the top of the page</a> about how Ruby/Cocoa bridges work? Paraphrased:</p>
<blockquote><p>The average idiot will note that RubyCocoa uses the Libffi library to call the Objective-C methods implementations. That means the first method call will go through the #method_missing mechanism, you moron, and then the Ruby method will be defined on the Ruby proxy class, thus allowing all (initial queries to Obj C classes to not know about the method while) further calls to be direct, and faster.</p></blockquote>
<p>The best way to drive a developer nutz is to tell him something doesn&#8217;t exists when he/she is absolutely certain of the contrary. Go against logic. 1+1!=2, set a = b and (a == b) == false, function fooBar cannot be found because function fooBar is defined. There are plenty of other examples I&#8217;m sure.</p>
<p>Yes genius, you are attempting to learn Ruby Cocoa from the ass end. You know this but you are too arrogant to admit it, even to your significant other. Sure you&#8217;ll lie in bed and discuss things like how was work. The typical conversation leads you into a rambling session beginning with, &#8220;I had a bad day&#8230;&#8221; with you trying to explain to your incoherent loved one why things are getting you down. You can&#8217;t admit failure at this point as your loved one is lying, waiting for your to reveal weakness&#8230; any weakness that will serve as ammo in the next argument when you forget to cut the grass or have to run partially clad after the trash truck that powers away mercilessly from your residence because you had too many Bud Ice&#8217;s the prior night and passed out with that uncomfortable feeling that you knew you needed perform some important task but what the heck is it? No need to explain that you can&#8217;t perform your job because you skipped the fundamental steps required (actually learning the technology) to be productive in any capacity. </p>
<p>No worry, you can learn this stuff after you&#8217;ve used it. Learning is for sissies anyway, right? Who takes a class on starting an IV before declaring themselves a qualified Phd? That&#8217;s utter nonsense isn&#8217;t it? Just jam the damned needle somewhere close to the greenish looking line thing running down the arm and you&#8217;re all good! After the lawsuite begin you can enrol in Lincoln Tech and figure out why the deadly infection began in your first and only client. Yes we learn after we&#8217;ve trash talked the entire industry because it&#8217;s everyone else&#8217;s fault by now. The APIs should be written in a way that require no knowledge acquisition!</p>
<p>Disclaimer: The entirety of this article is meant tongue in cheek, while I appreciate all feedback positive and especially negative, don&#8217;t waste your time claiming Ruby and/or Cocoa is the best thing since Parish Smith got back with Eric Sermon. As a lover/consumer/advocate of anything programming related you&#8217;ll be preaching to the choir or buttering the tub of Land &#8216;o Lakes&#8230; you&#8217;ll be mowing the lawn mower&#8230; spray painting the brush, redundantly repeating the repetitive, repeatedly, or threading the thread spool. Save your keystrokes and don&#8217;t respond.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeforfun.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeforfun.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeforfun.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeforfun.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeforfun.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeforfun.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeforfun.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeforfun.wordpress.com/496/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeforfun.wordpress.com/496/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeforfun.wordpress.com/496/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=496&subd=codeforfun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://codeforfun.wordpress.com/2008/10/04/the-backward-guide-to-ruby-cocoa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11e7597f889f569d804b6f8c79e60e6a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Cliff</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby Calls ObjC!</title>
		<link>http://codeforfun.wordpress.com/2008/10/02/ruby-calls-objc/</link>
		<comments>http://codeforfun.wordpress.com/2008/10/02/ruby-calls-objc/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 03:11:50 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby iPhone Testing]]></category>

		<guid isPermaLink="false">http://codeforfun.wordpress.com/?p=494</guid>
		<description><![CDATA[I think I got it now! The other day I mentioned a problem with assert_responds_to in Ruby as you call into an ObjC controller. Today I had a different experience calling the &#8220;respond_to?&#8221; method on Object. Or so I thought the experience was different. Here&#8217;s what I observed, using autotest sometimes the assertion would pass. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=494&subd=codeforfun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I think I got it now! The other day I mentioned a problem with assert_responds_to in Ruby as you call into an ObjC controller. Today I had a different experience calling the &#8220;respond_to?&#8221; method on Object. Or so I thought the experience was different. Here&#8217;s what I observed, using autotest sometimes the assertion would pass. In my other example I was wsing the respond_to? message instead but sending this message after actually calling the method on the controller. Here&#8217;s what I mean.</p>
<p>This fails:</p>
<pre class="brush: ruby;">
  def test_my_model_can_request_my_data
	myModel = MapModel.alloc.init
	assert mapModel.respond_to?(&quot;requestMyData&quot;), &quot;MyModel should define a requestMyData method&quot;
	assert_not_nil myModel.requestMyData
  end
</pre>
<p>This passes:</p>
<pre class="brush: ruby;">
  def test_my_model_can_request_my_data
	myModel = MapModel.alloc.init
	assert_not_nil myModel.requestMyData
	assert mapModel.respond_to?(&quot;requestMyData&quot;), &quot;MyModel should define a requestMyData method&quot;
  end
</pre>
<p>It&#8217;s as if you have to send the message first before Ruby knows if the message is defined. That was sort of the thing I saw the other day. Adding the comment then removing the comment on an assert over a defined method gave different results. I&#8217;m going to try some introspection next, I&#8217;m just a little excited on figuring things out.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeforfun.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeforfun.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeforfun.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeforfun.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeforfun.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeforfun.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeforfun.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeforfun.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeforfun.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeforfun.wordpress.com/494/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=494&subd=codeforfun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://codeforfun.wordpress.com/2008/10/02/ruby-calls-objc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11e7597f889f569d804b6f8c79e60e6a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Cliff</media:title>
		</media:content>
	</item>
		<item>
		<title>RBIPhoneTest Oddities?</title>
		<link>http://codeforfun.wordpress.com/2008/10/01/rbiphonetest-oddities/</link>
		<comments>http://codeforfun.wordpress.com/2008/10/01/rbiphonetest-oddities/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 14:03:27 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Test Driven Development (TDD)]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby iPhone Testing]]></category>
		<category><![CDATA[RubyCocoa]]></category>

		<guid isPermaLink="false">http://codeforfun.wordpress.com/?p=488</guid>
		<description><![CDATA[Of course I don&#8217;t expect things to work 100% so it&#8217;s no surprise that I found an oddity in the RBIPhoneTest project (brought to you by Dr. Nic). No discredit at all toward Dr. Nic, as he did a fantastic job with what little Apple gives you. Maybe it&#8217;s my misunderstanding of Ruby testing and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=488&subd=codeforfun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Of course I don&#8217;t expect things to work 100% so it&#8217;s no surprise that I found an oddity in the RBIPhoneTest project (brought to you by Dr. Nic). No discredit at all toward Dr. Nic, as he did a fantastic job with what little Apple gives you. Maybe it&#8217;s my misunderstanding of Ruby testing and the ZenTest autotest thing but I got autotest running since finishing that screencast last night and I noticed that inserting a simple &#8220;assert_respond_to&#8221; call started showing a test failure when I thought it should pass. I then found something even funnier. After commenting the failing &#8220;assert_respond_to&#8221; call the test passed! Yes, that&#8217;s not really funny but get this. I uncommented the very same line that was failing and got the test to pass!! Now that&#8217;s funny! not in the &#8220;haha&#8221; sense of funny but more in the &#8220;things that make you go hmm&#8230;&#8221; Arseniol Hall kinda funny. It&#8217;s repeatable as well. I change the message name in the responds to assertion to make it fail, change it back to make it right but it still fails, comment the line to make it pass, uncomment and it still passes! More on this later&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeforfun.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeforfun.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeforfun.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeforfun.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeforfun.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeforfun.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeforfun.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeforfun.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeforfun.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeforfun.wordpress.com/488/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=488&subd=codeforfun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://codeforfun.wordpress.com/2008/10/01/rbiphonetest-oddities/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11e7597f889f569d804b6f8c79e60e6a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Cliff</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone Unit? TDD?</title>
		<link>http://codeforfun.wordpress.com/2008/09/30/iphone-unit-tdd/</link>
		<comments>http://codeforfun.wordpress.com/2008/09/30/iphone-unit-tdd/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 03:29:24 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Test Driven Development (TDD)]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby iPhone Testing]]></category>
		<category><![CDATA[RubyCocoa]]></category>

		<guid isPermaLink="false">http://codeforfun.wordpress.com/?p=481</guid>
		<description><![CDATA[Thank God for people like Dr Nic. I managed to test drive a simple calculator project on the iPhone using his screencast. Just a quick note if you don&#8217;t come from the Ruby camp, (you know, like you spend most of your time obsessing over the JVM and toy with Groovy on the weekends):
You&#8217;ll want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=481&subd=codeforfun&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Thank God for people like <a href="http://drnicwilliams.com/">Dr Nic</a>. I managed to test drive a simple calculator project on the iPhone using <a href="http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/">his screencast</a>. Just a quick note if you don&#8217;t come from the Ruby camp, (you know, like you spend most of your time obsessing over the JVM and toy with Groovy on the weekends):</p>
<p>You&#8217;ll want to install rubigen to get his example to work.</p>
<pre class="brush: xml;">
sudo gem install rubigen
</pre>
<p>You&#8217;ll also find that since the project renaming iphoneruby doesn&#8217;t work. Instead &#8220;gem install rbiphonetest&#8221;. My only question is why doesn&#8217;t my calculator respond to the reset method after I completed the screencast walk through and added the reset method to the object?</p>
<pre class="brush: xml;">
assert_respond_to calc, :reset
</pre>
<p>fails for me! Must be another one of those iPhone/ObjC inconsistencies that I&#8217;ll learn along the way.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codeforfun.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codeforfun.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codeforfun.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codeforfun.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codeforfun.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codeforfun.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codeforfun.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codeforfun.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codeforfun.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codeforfun.wordpress.com/481/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codeforfun.wordpress.com&blog=228419&post=481&subd=codeforfun&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://codeforfun.wordpress.com/2008/09/30/iphone-unit-tdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11e7597f889f569d804b6f8c79e60e6a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Cliff</media:title>
		</media:content>
	</item>
	</channel>
</rss>