<?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>Anlek Consulting &#187; Uncategorized</title>
	<atom:link href="http://anlek.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://anlek.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 10 Nov 2011 16:29:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cucumber visiting pages using different formats</title>
		<link>http://anlek.com/2011/03/cucumber-visiting-pages-using-different-formats/</link>
		<comments>http://anlek.com/2011/03/cucumber-visiting-pages-using-different-formats/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 19:08:57 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anlek.com/?p=254</guid>
		<description><![CDATA[Ever wonder how you can write a cucumber test that would test how your web app responds to a different format, something like JSON or XML? I was trying to do the following: Background: Given I am logged in And there is the following feeds: &#124; title &#124; body &#124; category &#124; &#124; first feed [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wonder how you can write a cucumber test that would test how your web app responds to a different format, something like JSON or XML?<br />
I was trying to do the following:</p>
<pre>Background:
 Given I am logged in
 And there is the following feeds:
 | title | body | category |
 | first feed | something good | default |
 | second feed | even better | notice |
 | 3rd feed | something awesome | notice |

Scenario: Reading feeds via json
 When I go to the feeds page using json
 And I should see a json file
 And I should see 3 feeds in the json</pre>
<p>Running this code I would get a &#8220;<em>Can&#8217;t find mapping from &#8220;the feeds page using json&#8221; to a path.</em>&#8221;</p>
<p>Trying to figure out how I can do this, I tried to write a new step, like this:</p>
<pre>When %r{^I go to the (w+) page using (w+)$} do |page, format|...</pre>
<p>but this resulted in:<em> Ambiguous match of &#8220;I go to the feeds page using json&#8221;</em></p>
<p>So, I posted the question on<a title="Question on StackOverFlow" href="http://stackoverflow.com/questions/5385676/best-way-to-do-a-visit-step-to-a-page-with-a-different-format-cucumber" target="_blank"> StackOverFlow</a> and it seems everyone was thinking the same way I was.</p>
<p>I continued playing  with this idea and here is how I solved the problem:</p>
<p>Modifying the <strong>paths.rb</strong> file, I changed (Changes are in bold)</p>
<pre><code>def path_to(page_name)
    # Split out format if page_name includes ' using '
    # Example: When I go to the accounts page using json
    <strong>page_name, format = page_name.split(' using ')</strong>
    case page_name

    when /the homes?page/
      '/'
    when /the new account page/
      #pass format
      new_account_path(<strong>:format =&gt; format</strong>)

    else
      begin
        page_name =~ /the (.*) page/
        path_components = $1.split(/s+/)
        # Also make sure to pass format to the 'guessed' path
        self.send(path_components.push('path').join('_').to_sym<strong>, :format =&gt; format</strong>)
      rescue Object =&gt; e
        raise "Can't find mapping from "#{page_name}" to a path.n" +
          "Now, go and add a mapping in #{__FILE__}"
      end
    end
  end
end
</code></pre>
<p>This way I don&#8217;t have to modify anything else in my features and everything just works.</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2011/03/cucumber-visiting-pages-using-different-formats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OSX 10.6.5 breaks Apachectl</title>
		<link>http://anlek.com/2010/11/osx-10-6-5-breaks-apachectl/</link>
		<comments>http://anlek.com/2010/11/osx-10-6-5-breaks-apachectl/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 02:32:13 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anlek.com/?p=234</guid>
		<description><![CDATA[Trying to run: sudo apachectl restart Are you getting: /usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument Edit your /usr/sbin/apachectl on line 65 from: ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`" to: ULIMIT_MAX_FILES="" and try again. It should now be working agian For more information checkout Deversus]]></description>
			<content:encoded><![CDATA[<p>Trying to run:<br />
<code>sudo apachectl restart</code></p>
<p>Are you getting:<br />
<code>/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument</code></p>
<p>Edit your /usr/sbin/apachectl on line <strong>65 </strong>from:</p>
<p><code>ULIMIT_MAX_FILES=<strong>"</strong><em>ulimit -S -n `ulimit -H -n`</em><strong>"</strong></code></p>
<p>to:</p>
<p><code>ULIMIT_MAX_FILES=<strong>""</strong></code></p>
<p>and try again. It should now be working agian</p>
<p>For more information checkout <a href="http://blog.deversus.com/2010/11/mac-os-1065-apachectl-usrsbinapachectl-line-82-ulimit-open-files-cannot-modify-limit-invalid-argument/" target="_blank">Deversus</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2010/11/osx-10-6-5-breaks-apachectl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog&#8217;s back up! (and a little update about Anlek Consulting)</title>
		<link>http://anlek.com/2010/09/blogs-back-up-and-a-little-update-about-anlek-consulting/</link>
		<comments>http://anlek.com/2010/09/blogs-back-up-and-a-little-update-about-anlek-consulting/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 15:10:27 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=197</guid>
		<description><![CDATA[I&#8217;m happy to say that the blog is back! Sorry for how long we were down but Anlek Consulting has moved offices and the local server (which was running this blog) was taken down and couldn&#8217;t be brought back up. So now we have a new home which should give us a better up time. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to say that the blog is back!</p>
<p>Sorry for how long we were down but Anlek Consulting has moved offices and the local server (which was running this blog) was taken down and couldn&#8217;t be brought back up. So now we have a new home which should give us a better up time.</p>
<p>A little update on what&#8217;s going on at Anlek Consulting. I (Andrew) will be doing a trip around Canada and the USA, hoping to be working on the road with my cell phone and free wifi spots. In light of this, I&#8217;m going to probably blog a bit more about the challenges and adventures of working on the road. Stay tuned for some fun posts!</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2010/09/blogs-back-up-and-a-little-update-about-anlek-consulting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Busy Busy Busy</title>
		<link>http://anlek.com/2008/11/busy-busy-busy/</link>
		<comments>http://anlek.com/2008/11/busy-busy-busy/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 23:09:07 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=37</guid>
		<description><![CDATA[Just wanted to apologize for the very long break in our posts but I&#8217;ve been crazy busy with projects that I just haven&#8217;t had a moment to write about anything. But coming soon I will review the new SitePoint book &#8216;Everything You Know About CSS Is Wrong!&#8216;. So stay tuned, more stuff is coming!]]></description>
			<content:encoded><![CDATA[<p>Just wanted to apologize for the very long break in our posts but I&#8217;ve been crazy busy with projects that I just haven&#8217;t had a moment to write about anything. But coming soon I will review the new SitePoint book &#8216;<a href="http://www.sitepoint.com/books/csswrong1/">Everything You Know About CSS Is Wrong!</a>&#8216;.</p>
<p>So stay tuned, more stuff is coming!</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2008/11/busy-busy-busy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anlek now has a blog!</title>
		<link>http://anlek.com/2008/08/anlek-now-has-a-blog/</link>
		<comments>http://anlek.com/2008/08/anlek-now-has-a-blog/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 21:10:14 +0000</pubDate>
		<dc:creator>Andrew Kalek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=3</guid>
		<description><![CDATA[We just wanted to let everyone know that Anlek Consulting now has a blog! We look forward to publishing the latest and greatest in the world of technology. Our main focus will be on Ruby on Rails, iPhone and Smarthomes. Of course we don&#8217;t want to limit our selfs to just those, so stay tune [...]]]></description>
			<content:encoded><![CDATA[<p>We just wanted to let everyone know that Anlek Consulting now has a blog!</p>
<p>We look forward to publishing the latest and greatest in the world of technology. Our main focus will be on Ruby on Rails, iPhone and Smarthomes. Of course we don&#8217;t want to limit our selfs to just those, so stay tune and see what we come up with!</p>
<p>Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://anlek.com/2008/08/anlek-now-has-a-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

