<?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; cruisecontrol</title>
	<atom:link href="http://pivotallabs.com/tag/cruisecontrol/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Tue, 18 Jun 2013 03:38:22 +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 9/1/2010 &#8211; Rspec2 + RubyMine and Testing for Class methods</title>
		<link>http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/</link>
		<comments>http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 16:24:00 +0000</pubDate>
		<dc:creator>Glenn Jahnke</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[cruisecontrol]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubymine]]></category>
		<category><![CDATA[rvm]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/</guid>
		<description><![CDATA[<p><h1>Help</h1>

<h2>Testing for class methods in Ruby</h2>

<p>How do you test for the existence of a class method? Test it using #respond_to?</p>

<pre><code>class Foo
    def self.bar
        puts "Hello, World!"
    end
end

Foo.respond_to?&#40;:bar&#41;
 =&#62; true
</code></pre>

<p>And to make sure we are really just talking about class methods and not instance methods:</p>

<pre><code>foo = Foo.new

foo.respond_to?&#40;:bar&#41;
 =&#62; false
</code></pre>

<h1>Interesting</h1>

<h2>RubyMine and Rspec2 Bug Fixed!</h2>

<p>We use the latest and greatest RubyMine version available at Pivotal, but sometimes technology choices such as Rails 3 and Rspec 2 are still ahead of it. The formatter that analyzes test output breaks on Rspec 2's output before any tests run. The bug is further discussed <a href="http://youtrack.jetbrains.net/issue/RUBY-6485">http://youtrack.jetbrains.net/issue/RUBY-6485</a>. Luckily this bug will be fixed in the next EAP release.</p>

<h2>Excuting .rvmrc commands and cruisecontrol</h2>

<p>We've had a difficult time getting .rvmrc files to work with cruisecontrol.rb builds. Specifically, ccrb seems to launch the rake task in the project working directory. This means that the .rvmrc file is ignored. A workaround is to have your CI script directly use RVM or to add "<code>cd .. &#38;&#38; cd work</code>" before your project cruise script or rake task.</p> <a href="http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/">Standup 9/1/2010 &#8211; Rspec2 + RubyMine and Testing for Class methods</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h1>Help</h1>
<h2>Testing for class methods in Ruby</h2>
<p>How do you test for the existence of a class method? Test it using #respond_to?</p>
<pre><code>class Foo
    def self.bar
        puts "Hello, World!"
    end
end

Foo.respond_to?&#40;:bar&#41;
 =&gt; true
</code></pre>
<p>And to make sure we are really just talking about class methods and not instance methods:</p>
<pre><code>foo = Foo.new

foo.respond_to?&#40;:bar&#41;
 =&gt; false
</code></pre>
<h1>Interesting</h1>
<h2>RubyMine and Rspec2 Bug Fixed!</h2>
<p>We use the latest and greatest RubyMine version available at Pivotal, but sometimes technology choices such as Rails 3 and Rspec 2 are still ahead of it. The formatter that analyzes test output breaks on Rspec 2&#8242;s output before any tests run. The bug is further discussed <a href="http://youtrack.jetbrains.net/issue/RUBY-6485">http://youtrack.jetbrains.net/issue/RUBY-6485</a>. Luckily this bug will be fixed in the next EAP release.</p>
<h2>Excuting .rvmrc commands and cruisecontrol</h2>
<p>We&#8217;ve had a difficult time getting .rvmrc files to work with cruisecontrol.rb builds. Specifically, ccrb seems to launch the rake task in the project working directory. This means that the .rvmrc file is ignored. A workaround is to have your CI script directly use RVM or to add &#8220;<code>cd .. &amp;&amp; cd work</code>&#8221; before your project cruise script or rake task.</p>
<p>The post <a href="http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/">Standup 9/1/2010 &#8211; Rspec2 + RubyMine and Testing for Class methods</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-9-1-2010-rspec2-rubymine-and-testing-for-class-methods/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 5/7 queries in 0.014 seconds using apc
Object Caching 401/409 objects using apc

 Served from: pivotallabs.com @ 2013-06-18 02:05:18 by W3 Total Cache -->