Acceptance Tests with RSpec and Capybara

On the Ruby Rogues podcast I mentioned that I had moved away from Cucumber to RSpec and Capybara for my integration tests. Here’s a demo on how to do some TDD with RSpec and Capybara.

Download 180.6 MB
Download iPhone & iPod 109.2 MB

{ 15 comments… read them below or add one }

Richard Ramsden May 23, 2011 at 6:16 pm

@charles have you tried the commant-t plugin for vim? http://www.vim.org/scripts/script.php?script_id=3025

Reply

Charles Max Wood May 23, 2011 at 10:56 pm

I’ve had about 3 people show me the cool stuff with Janus and cmd-t. Pretty happy with it. 

Reply

Aljoscha M. Everding May 23, 2011 at 7:22 pm

Command-T is bundled with Janus. But I prefer peepopen by Geoffrey Grosenbach, which is really awesome http://peepcode.com/products/peepopen

Reply

Charles Max Wood May 23, 2011 at 10:57 pm

I’m playing with the Janus part right now. Jeff Schoolcraft actually did a quick screenshare to educate me. 

Reply

Loïc May 23, 2011 at 8:58 pm

Hello.

Great screencast!

By the way, command-t http://www.vim.org/scripts/script.php?script_id=3025 vim plugin is bundled with Janus. So command-t should work almost as in textmate.

From the Janus README :
“””
Command-T

Command-T provides a mechanism for searching for a file inside the
current working directory. It behaves similarly to command-t in
Textmate.

Customizations: Janus rebinds command-t () to bring up this
plugin. It defaults to t.
“””

Reply

Charles Max Wood May 26, 2011 at 2:41 pm

Thanks for letting me know. 

for those new to VIM the leader key is defined in your .vimrc file. By default, it’s the /-key, but most people change it to the ,-key or ;-key.

Reply

Daniel Passos May 26, 2011 at 11:56 am

Please. Post download links

Reply

Charles Max Wood May 26, 2011 at 2:40 pm

Download links posted. I should have the iTunes feed fixed soon.

Reply

Jim Wharton May 27, 2011 at 2:44 am

Oh my heck! You’re in Utah??? A co-worker and I were just discussing BDD today and I said, there HAS to be someone locally that can mentor us more about METHODOLOGY instead of actual code. We haven’t tried the local RUGs yet, but if you have ANY sort of time, let me know…. jamesawharton – at – gmail – com.

Reply

Charles Max Wood May 27, 2011 at 2:41 pm

I’m in Utah, but I love helping people. If anyone wants to do a screen sharing session, I’m open to that too. Just email me (chuck@teachmetocode.com)

Reply

Aslam May 27, 2011 at 12:20 pm

Try this http://peepcode.com/products/peepopen
it’s really awesome!

Reply

Matthew Keene June 3, 2011 at 5:00 am

Does anybody else find those MacVim files really hard to read?  In the default screen size and resolution they’re just a dark mess and even when I increase to full HD and full screen mode I find them only barely readable, particularly the grey comments on the dark background.  Is there any way you can use a different color scheme which is more readable?

Reply

Avi Tzurel August 25, 2011 at 5:14 pm

Charles, if you use Spork and autotest, you can run the specs each time you save any file that has a test.

for example user.rb => user_spec.rb (once you save any of these will run the specs, and eventually run the entire suit).
You are using Rails3 which load significantly slower then rails2, this will save you lots of time when you code.

Reply

Pravesh Singh December 30, 2011 at 9:36 am

Very informative post. Its really helpful for me and beginner too. Check out this link too its also having a nice post with wonderful explanation on acceptance testing…
http://mindstick.com/Articles/119f3758-54a0-4a33-94f4-6c6fa3a62b5c/?Acceptance%20Testing

Thanks

Reply

James Anderson March 8, 2013 at 2:26 am

https://github.com/kien/ctrlp.vim is the vim plugin you’re looking for.

Reply

Leave a Comment