<?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/"
	>

<channel>
	<title>Pivotal Labs &#187; Dmitriy Kalinin</title>
	<atom:link href="http://pivotallabs.com/author/dmitriy/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Wed, 22 May 2013 22:49:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>[standup] [sf] 03/27/13: Metro DC</title>
		<link>http://pivotallabs.com/standup-sf-032713-metro-dc/</link>
		<comments>http://pivotallabs.com/standup-sf-032713-metro-dc/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 21:13:36 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=17968</guid>
		<description><![CDATA[<p>Helps Sinatra Logger We have a Sinatra app mounted on Rails. If we raise an error in the Sinatra app, it doesn&#8217;t show anywhere. Can we attach the Rails logger somehow? Interestings Code Climate Blog: Rails Insecure Defaults http://blog.codeclimate.com/blog/2013/03/27/rails-insecure-defaults/ Rubymine 5.4 EAP: Rails 4, JRuby Nailgun support, and a feature requested by pivotallabs! Check out the release announcement here: http://blog.jetbrains.com/ruby/2013/03/rubymine-ichii-early-access-is-open/ This release also includes a small feature requested by the CloudPlanner team here at Pivotal Labs! When you create a new localization property from a view, the dialog will now default your localization file to the last one used: http://youtrack.jetbrains.com/issue/RUBY-13368 Thanks to the two Pivots who up voted our feature requests (Ken Mayer and Justin Richard)! And if you never got around to up voting our team&#8217;s RubyMine feature requests, please do so now! It only takes a sec: http://youtrack.jetbrains.com/issue/RUBY-13332 http://youtrack.jetbrains.com/issue/RUBY-13341 http://youtrack.jetbrains.com/issue/RUBY-13327 http://youtrack.jetbrains.com/issue/RUBY-13326 http://youtrack.jetbrains.com/issue/RUBY-13366 http://youtrack.jetbrains.com/issue/RUBY-13374</p><p>The post <a href="http://pivotallabs.com/standup-sf-032713-metro-dc/">[standup] [sf] 03/27/13: Metro DC</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Helps</h2>
<h3>Sinatra Logger</h3>
<p>We have a Sinatra app mounted on Rails. If we raise an error in the Sinatra app, it doesn&#8217;t show anywhere. Can we attach the Rails logger somehow?</p>
<h2>Interestings</h2>
<h3>Code Climate Blog: Rails Insecure Defaults</h3>
<p><a href="http://blog.codeclimate.com/blog/2013/03/27/rails-insecure-defaults/">http://blog.codeclimate.com/blog/2013/03/27/rails-insecure-defaults/</a></p>
<h3>Rubymine 5.4 EAP: Rails 4, JRuby Nailgun support, and a feature requested by pivotallabs!</h3>
<p>Check out the release announcement here: <a href="http://blog.jetbrains.com/ruby/2013/03/rubymine-ichii-early-access-is-open/">http://blog.jetbrains.com/ruby/2013/03/rubymine-ichii-early-access-is-open/</a></p>
<p>This release also includes a small feature requested by the CloudPlanner team here at Pivotal Labs! When you create a new localization property from a view, the dialog will now default your localization file to the last one used: <a href="http://youtrack.jetbrains.com/issue/RUBY-13368">http://youtrack.jetbrains.com/issue/RUBY-13368</a></p>
<p>Thanks to the two Pivots who up voted our feature requests (Ken Mayer and Justin Richard)! And if you never got around to up voting our team&#8217;s RubyMine feature requests, please do so now! It only takes a sec:</p>
<p><a href="http://youtrack.jetbrains.com/issue/RUBY-13332">http://youtrack.jetbrains.com/issue/RUBY-13332</a><br />
<a href="http://youtrack.jetbrains.com/issue/RUBY-13341">http://youtrack.jetbrains.com/issue/RUBY-13341</a><br />
<a href="http://youtrack.jetbrains.com/issue/RUBY-13327">http://youtrack.jetbrains.com/issue/RUBY-13327</a><br />
<a href="http://youtrack.jetbrains.com/issue/RUBY-13326">http://youtrack.jetbrains.com/issue/RUBY-13326</a><br />
<a href="http://youtrack.jetbrains.com/issue/RUBY-13366">http://youtrack.jetbrains.com/issue/RUBY-13366</a><br />
<a href="http://youtrack.jetbrains.com/issue/RUBY-13374">http://youtrack.jetbrains.com/issue/RUBY-13374</a></p>
<p>The post <a href="http://pivotallabs.com/standup-sf-032713-metro-dc/">[standup] [sf] 03/27/13: Metro DC</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-sf-032713-metro-dc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[standup] [sf] 03/25/13: Zvezdochka</title>
		<link>http://pivotallabs.com/standup-sf-032513-zvezdochka/</link>
		<comments>http://pivotallabs.com/standup-sf-032513-zvezdochka/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 20:24:32 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[standup]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=17945</guid>
		<description><![CDATA[<p>Interestings .ruby-version (&#38; .ruby-gemset) The community appears to be converging on .ruby-version as a standard way to convey a project&#8217;s Ruby version. This as opposed to .rvmrc or .rbenv If you use RVM you can also use .ruby-gemset to specify a gemset. See https://gist.github.com/fnichol/1912050 for more info.</p><p>The post <a href="http://pivotallabs.com/standup-sf-032513-zvezdochka/">[standup] [sf] 03/25/13: Zvezdochka</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<h3>.ruby-version (&amp; .ruby-gemset)</h3>
<p>The community appears to be converging on .ruby-version as a standard way to convey a project&#8217;s Ruby version. This as opposed to .rvmrc or .rbenv</p>
<p>If you use RVM you can also use .ruby-gemset to specify a gemset.</p>
<p>See <a href="https://gist.github.com/fnichol/1912050">https://gist.github.com/fnichol/1912050</a> for more info.</p>
<p>The post <a href="http://pivotallabs.com/standup-sf-032513-zvezdochka/">[standup] [sf] 03/25/13: Zvezdochka</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-sf-032513-zvezdochka/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>June 1st, 2012: National Donut Day</title>
		<link>http://pivotallabs.com/june-1st-2012-national-donut-day/</link>
		<comments>http://pivotallabs.com/june-1st-2012-national-donut-day/#comments</comments>
		<pubDate>Fri, 01 Jun 2012 14:17:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/june-1st-2012-national-donut-day/</guid>
		<description><![CDATA[<p><h2>Helps</h2>

<ul>
<li>Sprockets fail in CI, not locally?</li>
</ul>

<p>No answer.</p>

<h2>Interestings</h2>

<ul>
<li>capybara-webkit has non-standard awesomeness</li>
</ul>

<p>https://github.com/thoughtbot/capybara-webkit#non-standard-driver-methods</p>

<p>Things like: </p>

<ul>
<li>driver.resize_window</li>
<li>driver.console_messages</li>
<li>driver.render  to get an image of the viewport. inorite?</li>
</ul> <a href="http://pivotallabs.com/june-1st-2012-national-donut-day/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/june-1st-2012-national-donut-day/">June 1st, 2012: National Donut Day</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Helps</h2>
<ul>
<li>Sprockets fail in CI, not locally?</li>
</ul>
<p>No answer.</p>
<h2>Interestings</h2>
<ul>
<li>capybara-webkit has non-standard awesomeness</li>
</ul>
<p>https://github.com/thoughtbot/capybara-webkit#non-standard-driver-methods</p>
<p>Things like: </p>
<ul>
<li>driver.resize_window</li>
<li>driver.console_messages</li>
<li>driver.render  to get an image of the viewport. inorite?</li>
</ul>
<p>The post <a href="http://pivotallabs.com/june-1st-2012-national-donut-day/">June 1st, 2012: National Donut Day</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/june-1st-2012-national-donut-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup May 31st, 2012: Thursday</title>
		<link>http://pivotallabs.com/standup-may-31st-2012-thursday/</link>
		<comments>http://pivotallabs.com/standup-may-31st-2012-thursday/#comments</comments>
		<pubDate>Thu, 31 May 2012 14:15:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-may-31st-2012-thursday/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>RVM now supports custom SSL versions</li>
</ul>

<p>Our project needs OpenSSL > v1.0.0 because we're trying to sign something with a DSA key.  We <a href="https://github.com/wayneeseguin/rvm/issues/1000">asked on github</a> and fifteen minutes later mpapis had pushed a change to make it configurable.  That's some of the best open source service out there.</p>

<ul>
<li>Chrome Heap inspector is your friend</li>
<li>Backbone Events do NOT get cleaned up</li>
</ul>

<p>If you declare any events in the events property of a initialize, they prevent your instance from being deleted/GC'd. Use an explicit destroy function that calls this.undelegateEvents&#40;&#41;</p> <a href="http://pivotallabs.com/standup-may-31st-2012-thursday/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-may-31st-2012-thursday/">Standup May 31st, 2012: Thursday</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>RVM now supports custom SSL versions</li>
</ul>
<p>Our project needs OpenSSL > v1.0.0 because we&#8217;re trying to sign something with a DSA key.  We <a href="https://github.com/wayneeseguin/rvm/issues/1000">asked on github</a> and fifteen minutes later mpapis had pushed a change to make it configurable.  That&#8217;s some of the best open source service out there.</p>
<ul>
<li>Chrome Heap inspector is your friend</li>
<li>Backbone Events do NOT get cleaned up</li>
</ul>
<p>If you declare any events in the events property of a initialize, they prevent your instance from being deleted/GC&#8217;d. Use an explicit destroy function that calls this.undelegateEvents&#40;&#41;</p>
<p>The post <a href="http://pivotallabs.com/standup-may-31st-2012-thursday/">Standup May 31st, 2012: Thursday</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-may-31st-2012-thursday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>without_page_refresh capybara helper</title>
		<link>http://pivotallabs.com/stuff/</link>
		<comments>http://pivotallabs.com/stuff/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 01:34:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[capybara]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/stuff/</guid>
		<description><![CDATA[<p><p>I recently had to write a small capybara helper:</p>

<pre><code>def without_page_refresh
  page.execute_script&#40;"window._withoutPageRefresh = 'BAM'"&#41;
  yield
  page.evaluate_script&#40;"window._withoutPageRefresh"&#41;.should == "BAM", "Page was navigated away"
end
</code></pre>

<p>Use case:</p>

<p>You are building a form that gracefully degrades
when javascript is not enabled. It goes something like this:</p>

<pre><code># uses rack-test so no javascript
scenario "User can lose money in an accessible way" do
  visit "/your_account"
  page.should have_content "You have $100"
  click_button "Charge me"
  page.should have_content "You have $50"
end
</code></pre>

<p>Next step is to make that form do the ajax thingy.
You copy test above and switch it to use javascript driver:</p>

<pre><code># uses selenium for javascript
scenario "User can lose money with style", :js =&#62; true do
  visit "/your_account"
  page.should have_content "You have $100"
  click_button "Charge me"
  page.should have_content "You have $50"
end
</code></pre>

<p>Newly written test is pretty good except that it passes without
writing a single line of javascript. So here's when that helper
comes into play. Our javascript test becomes:</p>

<pre><code># uses selenium for javascript
scenario "User can lose money with style", :js =&#62; true do
  visit "/your_account"

  without_page_refresh do
    page.should have_content "You have $100"
    click_button "Charge me"
    page.should have_content "You have $50"
  end
end
</code></pre>

<p>Now javascript test fails with "Page was navigated away"
since nothing is preventing that form from submiting to another page.</p> <a href="http://pivotallabs.com/stuff/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/stuff/">without_page_refresh capybara helper</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I recently had to write a small capybara helper:</p>
<pre><code>def without_page_refresh
  page.execute_script&#40;"window._withoutPageRefresh = 'BAM'"&#41;
  yield
  page.evaluate_script&#40;"window._withoutPageRefresh"&#41;.should == "BAM", "Page was navigated away"
end
</code></pre>
<p>Use case:</p>
<p>You are building a form that gracefully degrades<br />
when javascript is not enabled. It goes something like this:</p>
<pre><code># uses rack-test so no javascript
scenario "User can lose money in an accessible way" do
  visit "/your_account"
  page.should have_content "You have $100"
  click_button "Charge me"
  page.should have_content "You have $50"
end
</code></pre>
<p>Next step is to make that form do the ajax thingy.<br />
You copy test above and switch it to use javascript driver:</p>
<pre><code># uses selenium for javascript
scenario "User can lose money with style", :js =&gt; true do
  visit "/your_account"
  page.should have_content "You have $100"
  click_button "Charge me"
  page.should have_content "You have $50"
end
</code></pre>
<p>Newly written test is pretty good except that it passes without<br />
writing a single line of javascript. So here&#8217;s when that helper<br />
comes into play. Our javascript test becomes:</p>
<pre><code># uses selenium for javascript
scenario "User can lose money with style", :js =&gt; true do
  visit "/your_account"

  without_page_refresh do
    page.should have_content "You have $100"
    click_button "Charge me"
    page.should have_content "You have $50"
  end
end
</code></pre>
<p>Now javascript test fails with &#8220;Page was navigated away&#8221;<br />
since nothing is preventing that form from submiting to another page.</p>
<p>The post <a href="http://pivotallabs.com/stuff/">without_page_refresh capybara helper</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SF Standup for Friday, 12/9/2011</title>
		<link>http://pivotallabs.com/sf-standup-for-friday-12-9-2011/</link>
		<comments>http://pivotallabs.com/sf-standup-for-friday-12-9-2011/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 04:59:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/sf-standup-for-friday-12-9-2011/</guid>
		<description><![CDATA[<p><h2>Ask for Help</h2>

<ul>
<li>RubyMine 3.2.4 is slow... Solution is to update to the latest <a href="http://confluence.jetbrains.net/display/RUBYDEV/RubyMine+4.0+EAP+%28build+110.209%29+Release+Notes">RubyMine EAP 4</a>.</li>
</ul>

<h2>Interesting Things</h2>

<ul>
<li><p>Yehuda Katz announces <a href="http://yehudakatz.com/2011/12/08/announcing-amber-js/">Amber.js</a> &#40;previously known as SproutCore 2.0&#41;. "Amber brings a proven MVC architecture to web applications, as well as features that eliminate common boilerplate. If you played with SproutCore and liked the concepts but felt like it was too heavy, give Amber a try." -YK</p></li>
<li><p>Updates in <a href="https://github.com/gregbell/active_admin">active_admin</a> silently fail if you are using it with inherited_resources 1.3.0. Use 1.2.2 instead.</p></li>
</ul> <a href="http://pivotallabs.com/sf-standup-for-friday-12-9-2011/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/sf-standup-for-friday-12-9-2011/">SF Standup for Friday, 12/9/2011</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Ask for Help</h2>
<ul>
<li>RubyMine 3.2.4 is slow&#8230; Solution is to update to the latest <a href="http://confluence.jetbrains.net/display/RUBYDEV/RubyMine+4.0+EAP+%28build+110.209%29+Release+Notes">RubyMine EAP 4</a>.</li>
</ul>
<h2>Interesting Things</h2>
<ul>
<li>
<p>Yehuda Katz announces <a href="http://yehudakatz.com/2011/12/08/announcing-amber-js/">Amber.js</a> &#40;previously known as SproutCore 2.0&#41;. &#8220;Amber brings a proven MVC architecture to web applications, as well as features that eliminate common boilerplate. If you played with SproutCore and liked the concepts but felt like it was too heavy, give Amber a try.&#8221; -YK</p>
</li>
<li>
<p>Updates in <a href="https://github.com/gregbell/active_admin">active_admin</a> silently fail if you are using it with inherited_resources 1.3.0. Use 1.2.2 instead.</p>
</li>
</ul>
<p>The post <a href="http://pivotallabs.com/sf-standup-for-friday-12-9-2011/">SF Standup for Friday, 12/9/2011</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/sf-standup-for-friday-12-9-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cedar and OCUnit</title>
		<link>http://pivotallabs.com/cedar-and-ocunit/</link>
		<comments>http://pivotallabs.com/cedar-and-ocunit/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 09:47:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[cedar]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[ocunit]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/cedar-and-ocunit/</guid>
		<description><![CDATA[<p><p>tl;dr Latest version of Cedar can nicely integrate with Xcode just like OCUnit.</p>

<h2>Why</h2>

<p>When creating new Xcode project you might have noticed that New Project dialog has 'Include Unit Tests' checkbox at the bottom. When that option is selected in addition to creating an app target Xcode will also create a separate target that is used for testing your application. This target most likely will be named [app]Tests. Convenient, huh! Since Xcode is such a nice IDE[1] it will also create an example test file that uses Xcode's built-in unit testing framework -- OCUnit &#40;also known as SenTestingKit&#41;. If you never heard of it below is a screenshot of how that example OCUnit test file looks.</p>

<p><img src="http://assets.pivotallabs.com/1220/original/failed_ocunit_small.jpg" />
Because Apple ships OCUnit with Xcode it is tightly integrated into the IDE and that gives it somewhat of an advantage over other testing frameworks. Example of such unfair treatment is relatively nice looking red error markers &#40;shown above&#41; that show up next to failed test cases when application tests are run. If you have ever used Cedar before you would know that when Cedar specs fail we do not get those markers but rather we are presented with boring gray console output &#40;we have  dots though!&#41;. Unfortunately there is no documented way for custom testing frameworks to mimic OCUnit behavior without building on top of it. But even if do decide to use OCUnit as a base for your custom testing framework you will run into several problems. One of those problems, at least a year ago, was that you could not reliably use debugger with OCUnit tests. That was one of the main reasons why Cedar was not build on top of it. Recently, however, Xcode 4 was released with a lot of enhancements including better support for running OCUnit tests &#40;with or without debugger&#41; or so it seems. Red markers being a driving force, once again it was worth to investigate on how take advantage of OCUnit goodies from Cedar. <a href="http://github.com/pivotal/cedar">Latest version of Cedar</a> succeeds at that. What follows are the steps on how to setup Cedar for maximum Xcode integration.</p>

<h2>Setup steps</h2>

<p><img src="http://assets.pivotallabs.com/1221/original/new_xcode_project_small.jpg" />
Check 'Include Unit Tests' checkbox in New Project dialog. If you want to add application tests to an existing project here is a very nice tutorial: <a href="http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/">http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/</a></p>

<p><img src="http://assets.pivotallabs.com/1222/original/other_linker_flags_small.jpg" />
After Xcode is done creating a new project file go to Build Settings for application tests target &#40;in this case ExampleTests&#41; and find Other Linker Flags settings. Add <code>-ObjC</code>, <code>-all_load</code>, and <code>-lstdc++</code> to that setting and click Done.</p>

<p><img src="http://assets.pivotallabs.com/1224/original/static_library_small.jpg" />
Next step is to add Cedar static library to application tests target.</p>

<p><img src="http://assets.pivotallabs.com/1223/original/spec_file_small.jpg" />
Now you are ready to create a Cedar spec file. Create a new empty file and end the filename with 'Spec.mm'. 'mm' file extension is needed to be able to use built-in Cedar matcher library. Also since this file should only be run as part of application tests and not the actual application make sure that you only include it in application tests target.</p></p>

<p><p><img src="http://assets.pivotallabs.com/1218/original/example_spec_small.jpg" />
Add a test or two &#40;see above for example&#41; to be able to test that Cedar is working correctly. Example above tries to assert that 2+2 equals 5 and that should hopefully fail. Notice that here I'm using recently added Cedar matchers should syntax. If you do not like that you can always rewrite that expectation as <code>expect&#40;2+2&#41;.to&#40;equal&#40;5&#41;&#41;;</code></p>

<p><img src="http://assets.pivotallabs.com/1225/original/failed_example_small.jpg" />
<a href="http://assets.pivotallabs.com/1219/original/failed_example.jpg">Larger image.</a>
And finally to run specs you just wrote select scheme for your app &#40;in this case Example&#41; from the drop down in the upper left corner and press 'Cmd+U'. 'Cmd+U' in Xcode by default runs tests associated with selected scheme. That should first build your app &#40;because application tests target lists the app as a target dependency&#41;, then build application tests target and then run the tests. Since 2+2 does not equal 5 you will see that Xcode will highlight that line in red and show that as an error in the errors panel on the left side. Fixing that expectation should make the test pass.</p>

<h2>Running from the command line</h2>

<p>If you want to run your application tests from the command line you can use <code>rake ocunit:application</code> to do that. Before doing so make sure you have updated <code>APP_NAME</code> and <code>OCUNIT_APPLICATION_SPECS_TARGET_NAME</code> in the Rakefile. Also you'll need to use Debug for <code>CONFIGURATION</code> so that your tests are able to include classes from your application. What's nice about this rake task is that it is ready to be used on your CI machine since it returns exit code 1 when any tests fail and 0 if they all succeed. It also prints in color.</p>

<h2>How it actually works</h2>

<p>If you are wondering how Cedar pretends to be OCUnit here is a short summary:</p>

<ul>
<li>When Cedar is loaded it overrides runTests class method on <code>SenTestProbe</code> class &#40;related file to look at is <a href="https://github.com/pivotal/cedar/blob/master/Source/iPhone/CDROTestIPhoneRunner.m">CDROTestIPhoneRunner.m</a>&#41;</li>
<li><code>SenTestProbe +runTests</code> gets called by otest -- an executable that Xcode uses to run tests after it injected the application tests bundle into TEST_HOST app</li>
<li>Since <code>SenTestProbe +runTests</code> was overridden with Cedar's run method Cedar executes all of its specs following all the usual rules: focused, pended, etc.</li>
<li>When specs are running <code>CDROTestReporter</code> &#40;<a href="https://github.com/pivotal/cedar/blob/master/Source/CDROTestReporter.m">source</a>&#41; gets notified which tests passed, failed, got skipped, etc. and prints out appropriate information which you see in console log</li>
<li><code>CDROTestReporter</code> prints out failed tests in a way that is recognized by Xcode &#40;OCUnit spits out same output for failed examples&#41; e.g.:</li>
</ul>

<pre>Test Case '-[ExampleTests testExample]' started.
/Users/work/workspace/Example/ExampleTests/ExampleTests.m:16: error: -[ExampleTests testExample] : '4' should be equal to '5': 2+2 != 5
Test Case '-[ExampleTests testExample]' failed &#40;0.000 seconds&#41;.</pre>

<ul>
<li>Xcode notices that pattern in the console output, parses it, gets filename and line number and marks that file location with a red marker to indicate a  test failure</li>
</ul>

<h2>Drawbacks/Not implemented features</h2>

<ul>
<li>Debugger support is still a bit flaky but this is a problem with Xcode/OCUnit integration</li>
<li>I have not tried running it on the device but it should work</li>
<li>If you are used to specifying <code>-SenTest</code> option to run specific test case it will be ignored; however, you can use Cedar's fit, fdescribe, and fcontext to focus on specific tests</li>
<li>Some third party OCUnit add-ons might not work &#40;let us know about them&#41;</li>
</ul>

<h2>Useful links</h2>

<ul>
<li><a href="http://github.com/pivotal/cedar">Cedar source code</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/135-Unit_Testing_Applications/unit_testing_applications.html">Apple Unit Testing Overview</a></li>
<li>Official but outdated <a href="http://www.sente.ch/software/ocunit/#Download">OCUnit and otest source code</a></li>
<li>More recent version of <a href="https://github.com/jy/SenTestingKit">OCUnit source code</a></li>
<li>Public <a href="https://www.pivotaltracker.com/projects/77775">Pivotal Tracker project for Cedar</a> to submit bugs and feature requests</li>
</ul>

<p>[1] It's not.</p> <a href="http://pivotallabs.com/cedar-and-ocunit/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/cedar-and-ocunit/">Cedar and OCUnit</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>tl;dr Latest version of Cedar can nicely integrate with Xcode just like OCUnit.</p>
<h2>Why</h2>
<p>When creating new Xcode project you might have noticed that New Project dialog has &#8216;Include Unit Tests&#8217; checkbox at the bottom. When that option is selected in addition to creating an app target Xcode will also create a separate target that is used for testing your application. This target most likely will be named [app]Tests. Convenient, huh! Since Xcode is such a nice IDE[1] it will also create an example test file that uses Xcode&#8217;s built-in unit testing framework &#8212; OCUnit &#40;also known as SenTestingKit&#41;. If you never heard of it below is a screenshot of how that example OCUnit test file looks.</p>
<p><img src="http://assets.pivotallabs.com/1220/original/failed_ocunit_small.jpg" /><br />
Because Apple ships OCUnit with Xcode it is tightly integrated into the IDE and that gives it somewhat of an advantage over other testing frameworks. Example of such unfair treatment is relatively nice looking red error markers &#40;shown above&#41; that show up next to failed test cases when application tests are run. If you have ever used Cedar before you would know that when Cedar specs fail we do not get those markers but rather we are presented with boring gray console output &#40;we have  dots though!&#41;. Unfortunately there is no documented way for custom testing frameworks to mimic OCUnit behavior without building on top of it. But even if do decide to use OCUnit as a base for your custom testing framework you will run into several problems. One of those problems, at least a year ago, was that you could not reliably use debugger with OCUnit tests. That was one of the main reasons why Cedar was not build on top of it. Recently, however, Xcode 4 was released with a lot of enhancements including better support for running OCUnit tests &#40;with or without debugger&#41; or so it seems. Red markers being a driving force, once again it was worth to investigate on how take advantage of OCUnit goodies from Cedar. <a href="http://github.com/pivotal/cedar">Latest version of Cedar</a> succeeds at that. What follows are the steps on how to setup Cedar for maximum Xcode integration.</p>
<h2>Setup steps</h2>
<p><img src="http://assets.pivotallabs.com/1221/original/new_xcode_project_small.jpg" /><br />
Check &#8216;Include Unit Tests&#8217; checkbox in New Project dialog. If you want to add application tests to an existing project here is a very nice tutorial: <a href="http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/">http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/</a></p>
<p><img src="http://assets.pivotallabs.com/1222/original/other_linker_flags_small.jpg" /><br />
After Xcode is done creating a new project file go to Build Settings for application tests target &#40;in this case ExampleTests&#41; and find Other Linker Flags settings. Add <code>-ObjC</code>, <code>-all_load</code>, and <code>-lstdc++</code> to that setting and click Done.</p>
<p><img src="http://assets.pivotallabs.com/1224/original/static_library_small.jpg" /><br />
Next step is to add Cedar static library to application tests target.</p>
<p><img src="http://assets.pivotallabs.com/1223/original/spec_file_small.jpg" /><br />
Now you are ready to create a Cedar spec file. Create a new empty file and end the filename with &#8216;Spec.mm&#8217;. &#8216;mm&#8217; file extension is needed to be able to use built-in Cedar matcher library. Also since this file should only be run as part of application tests and not the actual application make sure that you only include it in application tests target.</p>
</p>
<p>
<p><img src="http://assets.pivotallabs.com/1218/original/example_spec_small.jpg" /><br />
Add a test or two &#40;see above for example&#41; to be able to test that Cedar is working correctly. Example above tries to assert that 2+2 equals 5 and that should hopefully fail. Notice that here I&#8217;m using recently added Cedar matchers should syntax. If you do not like that you can always rewrite that expectation as <code>expect&#40;2+2&#41;.to&#40;equal&#40;5&#41;&#41;;</code></p>
<p><img src="http://assets.pivotallabs.com/1225/original/failed_example_small.jpg" /><br />
<a href="http://assets.pivotallabs.com/1219/original/failed_example.jpg">Larger image.</a><br />
And finally to run specs you just wrote select scheme for your app &#40;in this case Example&#41; from the drop down in the upper left corner and press &#8216;Cmd+U&#8217;. &#8216;Cmd+U&#8217; in Xcode by default runs tests associated with selected scheme. That should first build your app &#40;because application tests target lists the app as a target dependency&#41;, then build application tests target and then run the tests. Since 2+2 does not equal 5 you will see that Xcode will highlight that line in red and show that as an error in the errors panel on the left side. Fixing that expectation should make the test pass.</p>
<h2>Running from the command line</h2>
<p>If you want to run your application tests from the command line you can use <code>rake ocunit:application</code> to do that. Before doing so make sure you have updated <code>APP_NAME</code> and <code>OCUNIT_APPLICATION_SPECS_TARGET_NAME</code> in the Rakefile. Also you&#8217;ll need to use Debug for <code>CONFIGURATION</code> so that your tests are able to include classes from your application. What&#8217;s nice about this rake task is that it is ready to be used on your CI machine since it returns exit code 1 when any tests fail and 0 if they all succeed. It also prints in color.</p>
<h2>How it actually works</h2>
<p>If you are wondering how Cedar pretends to be OCUnit here is a short summary:</p>
<ul>
<li>When Cedar is loaded it overrides runTests class method on <code>SenTestProbe</code> class &#40;related file to look at is <a href="https://github.com/pivotal/cedar/blob/master/Source/iPhone/CDROTestIPhoneRunner.m">CDROTestIPhoneRunner.m</a>&#41;</li>
<li><code>SenTestProbe +runTests</code> gets called by otest &#8212; an executable that Xcode uses to run tests after it injected the application tests bundle into TEST_HOST app</li>
<li>Since <code>SenTestProbe +runTests</code> was overridden with Cedar&#8217;s run method Cedar executes all of its specs following all the usual rules: focused, pended, etc.</li>
<li>When specs are running <code>CDROTestReporter</code> &#40;<a href="https://github.com/pivotal/cedar/blob/master/Source/CDROTestReporter.m">source</a>&#41; gets notified which tests passed, failed, got skipped, etc. and prints out appropriate information which you see in console log</li>
<li><code>CDROTestReporter</code> prints out failed tests in a way that is recognized by Xcode &#40;OCUnit spits out same output for failed examples&#41; e.g.:</li>
</ul>
<pre>Test Case '-[ExampleTests testExample]' started.
/Users/work/workspace/Example/ExampleTests/ExampleTests.m:16: error: -[ExampleTests testExample] : '4' should be equal to '5': 2+2 != 5
Test Case '-[ExampleTests testExample]' failed &#40;0.000 seconds&#41;.</pre>
<ul>
<li>Xcode notices that pattern in the console output, parses it, gets filename and line number and marks that file location with a red marker to indicate a  test failure</li>
</ul>
<h2>Drawbacks/Not implemented features</h2>
<ul>
<li>Debugger support is still a bit flaky but this is a problem with Xcode/OCUnit integration</li>
<li>I have not tried running it on the device but it should work</li>
<li>If you are used to specifying <code>-SenTest</code> option to run specific test case it will be ignored; however, you can use Cedar&#8217;s fit, fdescribe, and fcontext to focus on specific tests</li>
<li>Some third party OCUnit add-ons might not work &#40;let us know about them&#41;</li>
</ul>
<h2>Useful links</h2>
<ul>
<li><a href="http://github.com/pivotal/cedar">Cedar source code</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/135-Unit_Testing_Applications/unit_testing_applications.html">Apple Unit Testing Overview</a></li>
<li>Official but outdated <a href="http://www.sente.ch/software/ocunit/#Download">OCUnit and otest source code</a></li>
<li>More recent version of <a href="https://github.com/jy/SenTestingKit">OCUnit source code</a></li>
<li>Public <a href="https://www.pivotaltracker.com/projects/77775">Pivotal Tracker project for Cedar</a> to submit bugs and feature requests</li>
</ul>
<p>[1] It&#8217;s not.</p>
<p>The post <a href="http://pivotallabs.com/cedar-and-ocunit/">Cedar and OCUnit</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/cedar-and-ocunit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Too many parentheses</title>
		<link>http://pivotallabs.com/escaping-from-parentheses-in-cedar/</link>
		<comments>http://pivotallabs.com/escaping-from-parentheses-in-cedar/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 08:26:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[cedar]]></category>
		<category><![CDATA[cplusplus]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/escaping-from-parentheses-in-cedar/</guid>
		<description><![CDATA[<p><p>Cedar comes with its own built-in matcher library and here is Adam Milligan's <a href="http://pivotallabs.com/users/amilligan/blog/articles/1906-cedar-expectations">blog post</a> that explains on how to use it. An example of expectation written using Cedar matcher library:</p>

<pre><code>expect&#40;controller.button&#41;.to_not&#40;be_nil&#40;&#41;&#41;;
</code></pre>

<p>Even though this is much better than OCHamcrest it is still not satisfying &#40;in my opinion&#41; because there are so many parentheses involved. Since Cedar matcher library is written in C++ we can do some magic here. The result is you can write your expectations like this:</p>

<pre><code>controller.button should_not be_nil;
</code></pre>

<p>So let's dig into how Cedar's should syntax is implemented.</p>

<pre><code>  controller.button   should_not   be_nil
&#124;-------------------&#124;------------&#124;--------&#124;
    actual value       C macro     matcher
</code></pre>

<p>As you might have guessed <code>should</code> and <code>should_not</code> are C macros. Besides making possible for each expectation to know its filename and line number &#40;with <code>__FILE__</code> and <code>__LINE__</code> preprocessor variables&#41;, they also hide the unnecessary complexity which makes this syntax possible. Here is how it looks expanded:</p>

<pre><code>  controller.button   ,&#40;ActualValueMarker&#41;{__FILE__, __LINE__},true,   be_nil
&#124;-------------------&#124;------------------------------------------------&#124;--------&#124;
    actual value                        mumbo jumbo                    matcher
</code></pre>

<p>So how does this mumbo jumbo work? Since Cedar matcher library was written in C++ we can overload the comma operator. Besides being a weird operator to overload, it has a useful property that we can exploit here. Comma operator has the lowest precedence among all other operators and that allows us to write <code>2+2 should equal&#40;4&#41;</code> instead of <code>&#40;2+2&#41; should equal&#40;4&#41;</code>. Now let's break mumbo jumbo into pieces:</p>

<pre><code>&#40;1&#41; &#60;actual value&#62;
    &#40;ActualValueMarker&#41;{__FILE__, __LINE__} -&#62; &#40;2&#41; ActualValue
                                                   true/false  -&#62; &#40;3&#41; ActualValueProxy
                                                                      &#60;matcher&#62;
</code></pre>

<p>&#40;1&#41; This step captures actual value &#40;can be anything since it is templated&#41;, filename and line number. It is implemented like this:</p>

<pre><code>template&#60;typename T&#62;
const ActualValue&#60;T&#62; operator,&#40;const T &#38; actualValue, const ActualValueMarker &#38; marker&#41; {
    return ActualValue&#60;T&#62;&#40;marker.fileName, marker.lineNumber, actualValue&#41;;
}
</code></pre>

<p>&#40;2&#41; Now we overload comma operator to match <code>ActualValue</code> &#40;returned from step 1&#41; and a bool that indicates whether matcher result should be negated.</p>

<pre><code>template&#60;typename T&#62;
const ActualValueMatchProxy&#60;T&#62; operator,&#40;const ActualValue&#60;T&#62; &#38; actualValue, bool negate&#41; {
    return negate ? actualValue.to_not : actualValue.to;
}
</code></pre>

<p>&#40;3&#41; And finally we overload comma operator again so that it matches <code>ActualValueMatchProxy</code> &#40;returned from step 2&#41; and anything else. Second argument will be considered to be a matcher.</p>

<pre><code>template&#60;typename T, typename MatcherType&#62;
void operator,&#40;const ActualValueMatchProxy&#60;T&#62; &#38; matchProxy, const MatcherType &#38; matcher&#41; {
    matchProxy&#40;matcher&#41;;
}
</code></pre>

<p>That's pretty much all. Full implementation of should syntax &#40;which is just several more lines more than what is shown above&#41; can be found in <a href="https://github.com/pivotal/cedar/blob/master/Source/Headers/Matchers/ShouldSyntax.h">ShouldSyntax.h</a> &#40;and corresponding <a href="https://github.com/pivotal/cedar/blob/master/Spec/ShouldSyntaxSpec.mm">spec file</a> that makes sure syntax works&#41;. Everything above allows us to write expectations as follows:</p>

<pre><code>controller.button should_not be_nil&#40;&#41;;
</code></pre>

<p>Since the goal is to get rid of as many parentheses as possible we still have some work to do. Nil matcher that comes with Cedar is implemented with <a href="https://github.com/pivotal/cedar/blob/master/Source/Headers/Matchers/Base/BeNil.h">BeNil class</a>. The way it worked before was <code>be_nil</code> was a function defined in <code>Cedar::Matchers</code> namespace. Calling it each time would return a new instance of <code>BeNil</code> class. To make parentheses go away <code>be_nil</code> was turned into a static variable that is initialized only once to an instance of <code>BeNil</code> class. &#40;be_nil matcher still supports being used with two parentheses for backwards compatibility by implementing call operator on BeNil class.&#41; Bam.</p>

<pre><code>controller.button should_not be_nil;
</code></pre>

<p>Usually it is not recommended to use operator overloading for non-operator related purposes &#40;e.g. don't use + operator for subtraction&#41;; however, in this case I think it's fine to bend the rules just a bit to escape all those parentheses and provide clean expectation DSL. You can use should syntax with the latest <a href="https://github.com/pivotal/cedar">Cedar master branch</a>.</p> <a href="http://pivotallabs.com/escaping-from-parentheses-in-cedar/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/escaping-from-parentheses-in-cedar/">Too many parentheses</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Cedar comes with its own built-in matcher library and here is Adam Milligan&#8217;s <a href="http://pivotallabs.com/users/amilligan/blog/articles/1906-cedar-expectations">blog post</a> that explains on how to use it. An example of expectation written using Cedar matcher library:</p>
<pre><code>expect&#40;controller.button&#41;.to_not&#40;be_nil&#40;&#41;&#41;;
</code></pre>
<p>Even though this is much better than OCHamcrest it is still not satisfying &#40;in my opinion&#41; because there are so many parentheses involved. Since Cedar matcher library is written in C++ we can do some magic here. The result is you can write your expectations like this:</p>
<pre><code>controller.button should_not be_nil;
</code></pre>
<p>So let&#8217;s dig into how Cedar&#8217;s should syntax is implemented.</p>
<pre><code>  controller.button   should_not   be_nil
|-------------------|------------|--------|
    actual value       C macro     matcher
</code></pre>
<p>As you might have guessed <code>should</code> and <code>should_not</code> are C macros. Besides making possible for each expectation to know its filename and line number &#40;with <code>__FILE__</code> and <code>__LINE__</code> preprocessor variables&#41;, they also hide the unnecessary complexity which makes this syntax possible. Here is how it looks expanded:</p>
<pre><code>  controller.button   ,&#40;ActualValueMarker&#41;{__FILE__, __LINE__},true,   be_nil
|-------------------|------------------------------------------------|--------|
    actual value                        mumbo jumbo                    matcher
</code></pre>
<p>So how does this mumbo jumbo work? Since Cedar matcher library was written in C++ we can overload the comma operator. Besides being a weird operator to overload, it has a useful property that we can exploit here. Comma operator has the lowest precedence among all other operators and that allows us to write <code>2+2 should equal&#40;4&#41;</code> instead of <code>&#40;2+2&#41; should equal&#40;4&#41;</code>. Now let&#8217;s break mumbo jumbo into pieces:</p>
<pre><code>&#40;1&#41; &lt;actual value&gt;
    &#40;ActualValueMarker&#41;{__FILE__, __LINE__} -&gt; &#40;2&#41; ActualValue
                                                   true/false  -&gt; &#40;3&#41; ActualValueProxy
                                                                      &lt;matcher&gt;
</code></pre>
<p>&#40;1&#41; This step captures actual value &#40;can be anything since it is templated&#41;, filename and line number. It is implemented like this:</p>
<pre><code>template&lt;typename T&gt;
const ActualValue&lt;T&gt; operator,&#40;const T &amp; actualValue, const ActualValueMarker &amp; marker&#41; {
    return ActualValue&lt;T&gt;&#40;marker.fileName, marker.lineNumber, actualValue&#41;;
}
</code></pre>
<p>&#40;2&#41; Now we overload comma operator to match <code>ActualValue</code> &#40;returned from step 1&#41; and a bool that indicates whether matcher result should be negated.</p>
<pre><code>template&lt;typename T&gt;
const ActualValueMatchProxy&lt;T&gt; operator,&#40;const ActualValue&lt;T&gt; &amp; actualValue, bool negate&#41; {
    return negate ? actualValue.to_not : actualValue.to;
}
</code></pre>
<p>&#40;3&#41; And finally we overload comma operator again so that it matches <code>ActualValueMatchProxy</code> &#40;returned from step 2&#41; and anything else. Second argument will be considered to be a matcher.</p>
<pre><code>template&lt;typename T, typename MatcherType&gt;
void operator,&#40;const ActualValueMatchProxy&lt;T&gt; &amp; matchProxy, const MatcherType &amp; matcher&#41; {
    matchProxy&#40;matcher&#41;;
}
</code></pre>
<p>That&#8217;s pretty much all. Full implementation of should syntax &#40;which is just several more lines more than what is shown above&#41; can be found in <a href="https://github.com/pivotal/cedar/blob/master/Source/Headers/Matchers/ShouldSyntax.h">ShouldSyntax.h</a> &#40;and corresponding <a href="https://github.com/pivotal/cedar/blob/master/Spec/ShouldSyntaxSpec.mm">spec file</a> that makes sure syntax works&#41;. Everything above allows us to write expectations as follows:</p>
<pre><code>controller.button should_not be_nil&#40;&#41;;
</code></pre>
<p>Since the goal is to get rid of as many parentheses as possible we still have some work to do. Nil matcher that comes with Cedar is implemented with <a href="https://github.com/pivotal/cedar/blob/master/Source/Headers/Matchers/Base/BeNil.h">BeNil class</a>. The way it worked before was <code>be_nil</code> was a function defined in <code>Cedar::Matchers</code> namespace. Calling it each time would return a new instance of <code>BeNil</code> class. To make parentheses go away <code>be_nil</code> was turned into a static variable that is initialized only once to an instance of <code>BeNil</code> class. &#40;be_nil matcher still supports being used with two parentheses for backwards compatibility by implementing call operator on BeNil class.&#41; Bam.</p>
<pre><code>controller.button should_not be_nil;
</code></pre>
<p>Usually it is not recommended to use operator overloading for non-operator related purposes &#40;e.g. don&#8217;t use + operator for subtraction&#41;; however, in this case I think it&#8217;s fine to bend the rules just a bit to escape all those parentheses and provide clean expectation DSL. You can use should syntax with the latest <a href="https://github.com/pivotal/cedar">Cedar master branch</a>.</p>
<p>The post <a href="http://pivotallabs.com/escaping-from-parentheses-in-cedar/">Too many parentheses</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/escaping-from-parentheses-in-cedar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SF Standup for Friday, 4/29/2011: It&#039;s Friday, Friday&#8230;</title>
		<link>http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/</link>
		<comments>http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 16:02:00 +0000</pubDate>
		<dc:creator>Dmitriy Kalinin</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday/</guid>
		<description><![CDATA[<p><h2>Interesting Things</h2>

<ul>
<li>Be aware that when chaining rake tasks &#40;e.g. <code>rake db:migrate db:seed ...</code>&#41; ruby classes do not get reloaded in between tasks so you can end up with old class definitions.</li>
<li>Jared created <a href="http://hackingadvertising.com/">http://hackingadvertising.com/</a> to record his findings about running different ads through Google Adwords and Facebook Ads.</li>
<li>Requiring <a href="https://github.com/ryanb/cancan">cancan</a> matchers in spec_helper.rb breaks RubyMine's ability to run specs. Same weird behavior was noticed with other gems that rely on shoulda.</li>
</ul> <a href="http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/">SF Standup for Friday, 4/29/2011: It&#039;s Friday, Friday&#8230;</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interesting Things</h2>
<ul>
<li>Be aware that when chaining rake tasks &#40;e.g. <code>rake db:migrate db:seed ...</code>&#41; ruby classes do not get reloaded in between tasks so you can end up with old class definitions.</li>
<li>Jared created <a href="http://hackingadvertising.com/">http://hackingadvertising.com/</a> to record his findings about running different ads through Google Adwords and Facebook Ads.</li>
<li>Requiring <a href="https://github.com/ryanb/cancan">cancan</a> matchers in spec_helper.rb breaks RubyMine&#8217;s ability to run specs. Same weird behavior was noticed with other gems that rely on shoulda.</li>
</ul>
<p>The post <a href="http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/">SF Standup for Friday, 4/29/2011: It&#039;s Friday, Friday&#8230;</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/sf-standup-for-friday-4-29-2011-it-s-friday-friday-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 1068/1155 objects using apc

 Served from: pivotallabs.com @ 2013-05-23 06:14:04 by W3 Total Cache -->