<?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>kvn.io</title>
	<atom:link href="http://www.kvn.io/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kvn.io</link>
	<description>Notes on Web Development by Kevin Incorvia</description>
	<lastBuildDate>Fri, 26 Jul 2013 14:10:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
		<item>
		<title>Rails::Engine</title>
		<link>http://www.kvn.io/2013/07/railsengine/</link>
		<comments>http://www.kvn.io/2013/07/railsengine/#comments</comments>
		<pubDate>Fri, 26 Jul 2013 14:09:43 +0000</pubDate>
		<dc:creator>Kevin Incorvia</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails::Engine]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://www.kvn.io/?p=110</guid>
		<description><![CDATA[My talk at Boston.rb about Rails::Engines.]]></description>
				<content:encoded><![CDATA[<p>My talk at Boston.rb about Rails::Engines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kvn.io/2013/07/railsengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing routes in isolated Rails Engines with RSpec</title>
		<link>http://www.kvn.io/2013/04/testing-routes-in-isolated-rails-engines-with-rspec/</link>
		<comments>http://www.kvn.io/2013/04/testing-routes-in-isolated-rails-engines-with-rspec/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 14:19:29 +0000</pubDate>
		<dc:creator>Kevin Incorvia</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails::Engine]]></category>
		<category><![CDATA[RSpec]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.kvn.io/?p=90</guid>
		<description><![CDATA[One problem that you can run into when implementing a Rails Engine is hit or miss third party library support.  Even when a library does support engines (i.e. RSpec), because few people code in the context of them, documentation and online support can be few and far between.  When trying to test my mounted and <a class="more-link" href="http://www.kvn.io/2013/04/testing-routes-in-isolated-rails-engines-with-rspec/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>One problem that you can run into when implementing a Rails Engine is hit or miss third party library support.  Even when a library does support engines (i.e. RSpec), because few people code in the context of them, documentation and online support can be few and far between.  When trying to test my mounted and isolated engine’s routes I quickly realized RSpec would produce failures because it was loading my main app’s routes into the tests instead of my engine’s.  It seemed like it should be an easy fix but none of the solutions I found online worked.</p>
<p>Only after a “bundle show rspec-rails” and diving into the code did I find the very easy but non-obvious hook that fixed everything.  Turns out this hook was only added recently to routing tests, is being added to controller tests as we speak, and documentation is certainly light.  To set the routes used in Routing Tests (and soon Controller tests) use this public API:</p>
<div><script src="https://gist.github.com/5330656.js"></script><noscript><pre><code class="language-ruby ruby">describe 'routing tests' do
  routes { MyEngine::Engine.routes }

  it 'routes correctly' do
    { get: '/products' }.should
      route_to { controller: 'my_engine/products', action: 'index' }
  end
end</code></pre></noscript></div>
<div>
<p>If you want to read up on the history of the this new feature, see these two commits:</p>
<ol>
<ol>
<li><a href="https://github.com/rspec/rspec-rails/pull/694#issuecomment-16015502">Routing specs can set their own routes</a></li>
<li><a href="https://github.com/rspec/rspec-rails/pull/668">Allow routing specs to access engine routes</a></li>
</ol>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kvn.io/2013/04/testing-routes-in-isolated-rails-engines-with-rspec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You have no excuse to not use Slim</title>
		<link>http://www.kvn.io/2013/04/you-have-no-excuse-to-not-use-slim/</link>
		<comments>http://www.kvn.io/2013/04/you-have-no-excuse-to-not-use-slim/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 12:37:43 +0000</pubDate>
		<dc:creator>Kevin Incorvia</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ERB]]></category>
		<category><![CDATA[HAML]]></category>
		<category><![CDATA[Slim]]></category>

		<guid isPermaLink="false">http://www.kvn.io/?p=64</guid>
		<description><![CDATA[I&#8217;m a huge fan of Slim Templates.  I admit I always liked the idea of HAML, but when I was told that the cognitive load of using HAML was a small but unnecessary burden on  front-end developers, I felt like a whiny kid who couldn&#8217;t play with his new toy.  &#8221;But HAML takes minutes to learn!  How could <a class="more-link" href="http://www.kvn.io/2013/04/you-have-no-excuse-to-not-use-slim/">Read More</a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m a huge fan of <a title="Slim" href="http://slim-lang.com/">Slim Templates</a>.  I admit I always liked the idea of <a href="http://haml.info/">HAML</a>, but when I was told that the cognitive load of using HAML was a small but unnecessary burden on  front-end developers, I felt like a whiny kid who couldn&#8217;t play with his new toy.  &#8221;But HAML takes minutes to learn!  How could something so easy, slow someone down?&#8221; I&#8217;d think to myself.</p>
<p>With Slim Templates I believe you have no excuses left.  Slim is so close to HTML it&#8217;s absurd. Plus the benefits you get of terseness and forced structure are huge, especially in a team setting.  Check out the comparison I made here where a snippet of ERB was converted to Slim by removing elements (in red) and adding elements (in green).</p>
<p><a href="http://www.kvn.io/wordpress/wp-content/uploads/2013/04/erb_vs_slim.png"><img alt="erb_vs_slim" src="http://www.kvn.io/wordpress/wp-content/uploads/2013/04/erb_vs_slim.png" width="540" height="468" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kvn.io/2013/04/you-have-no-excuse-to-not-use-slim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World</title>
		<link>http://www.kvn.io/2013/03/hello-world/</link>
		<comments>http://www.kvn.io/2013/03/hello-world/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 03:53:03 +0000</pubDate>
		<dc:creator>Kevin Incorvia</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.kvn.io/?p=56</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<script src="https://gist.github.com/bc4249ed99a339827243.js"></script><noscript><pre><code class="language-ruby ruby">class Blog
  def hello!
    puts &quot;Hello World&quot;
  end
end

Blog.new.hello!</code></pre></noscript>
]]></content:encoded>
			<wfw:commentRss>http://www.kvn.io/2013/03/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
