Parallel tests now suppots any kind of test-suite(Test/RSpec/Cucumber), speeds up e.g. action_pack test-suite by 200%. Finally a good excuse for buying Dual/Quad-Core. Speedup those tests, go parallel!
Items matching "rspec" (RSS Feed)
March 07, 2010
January 31, 2010
January 24, 2010
If you do, then you might want to clean up your specs with RSpec attr extensions.
January 08, 2010
I created screencasts showing how to do Oracle PL/SQL unit testing with Ruby using ruby-plsql and RSpec.
January 04, 2010
I like to create Ruby projects, and I also like to use Hoe to manage them. With any Ruby project generator, I always hate having to add my usual boilerplate code and Rake tasks. Luckily, Hoe supports using project templates, stored in
Install:
Use:
~/.hoe_template, with the sow command. For example, here is the Hoe template I use to generate new projects, with RSpec 1.2.9 and YARD 0.5.2 setup.
Install:
git clone git://github.com/postmodern/hoe_template.git ~/.hoe_template
Use:
sow my_projectDecember 09, 2009
Fetching results using Google Blog Search brings the same problem as querying Twitter: duplicate results. See in part 2 of Google blog search BBDcasts episode a solution to this problem: adding a unique constraint on URLs and let ActiveRecord validations handle it. Of course, all covered with RSpec and Cucumber features.
December 02, 2009
Now that Twitter search results are working, it’s time to move on to other services. In BDDCasts episode 12 you'll see how to query Google Blog Search and aggregate the results with the ones fetched from Twitter by going through the red-green-refactor cycle with RSpec and Cucumber.
November 25, 2009
It’s really hard to overemphasize how helpful RSpec is and how much easier becomes your life if you have good specs coverage. But its outstanding flexibility enables many ways to make your specs awful: horribly slow, over-bloated, even non-readable sometimes. In this article I will give you some ideas how to improve your specs quality and increase efficiency of your BDD workflow.
November 13, 2009
ShardTheLove is a library for scaling ActiveRecord databases in Rails and Merb. ShardTheLove is built with support for migrations, testing/RSpec, a flexibility of partitioning patterns, a simple syntax, support for Rails & Merb, and a great name :-). ShardTheLove sample usage and github project page.
November 09, 2009
Querying Twitter repeatedly will return some of the results already fetched in previous runs, so episode 11 BDDCasts shows how to refactor existing code and remove duplicate results using behaviour driven development.
October 15, 2009
In this episode you'll see the speccing and implementation of the list of Twitter results fetched in the previous episode. The Dashboard will show this paginated list of search results using named scopes to easily specify their order. An interesting section is the use of the "multiline step arguments" feature of Cucumber to specify the expected search results.
October 12, 2009
This screencast reveals querying Twitter for user statuses. Before adding jnunemaker’s Twitter gem, you're presented with a general overview of the available search functionality by running a few test searches from a Ruby script. The interesting and challenging part is speccing external services, so you'll see the best way to spec the Twitter search response.
October 02, 2009
If in the previous episode we saw how to create search terms for a Brand, in this one, we'll see how to remove them. Also, there's a bit of refactoring of "Manage Brand" feature and an interesting way to add 'special' Cucumber steps. Towards the end of the episode, you'll see the helpfull Git.tmbundle. And, you're welcome to post your thoughts or suggestions in the new comments section.
September 23, 2009
Watch Jeffrey and Istvan in this new BDDCasts episode as they add the 'searches' relationship to Brand. They plan their approach and then go through the red-green cycle with RSpec and Cucumber to make the features happen.
September 17, 2009
The Brandizzle series continues with Episode 5 - The REST of Brand. This episode finishes out the remaining RESTful actions for the Brand resource following the red-green cycle, and introduces you to the remarkable_rails gem.
September 15, 2009
Using Spork to speed up RSpec and Cucumber episode describes the installation and configuration of Spork to make RSpec and Cucumber load specs and features a lot faster. This episode is part of the new Tools series which will present a number of tutorials on how to use tools to automate and streamline your BDD process.
September 09, 2009
As the number of tests goes up in your Rails project, you'll find yourself spending more and more time starting at the field of green dots waiting for RSpec to finish. This article shows you how to track down slow-running examples to target for refactoring.
August 25, 2009
Via Twitter I just learned about BDDCasts. It's a commercial screencasting site with two screencasts so far. It covers Cucumber, RSpec, and Rails. The author appears to be Jeffrey Schoolcraft.
August 18, 2009
Lockdown, an authorization system for Rails 2.x, released version 1.3.0: Ruby 1.9 compatibility and RSpec helpers to simplify testing your application's authorization rules. more...
Devver allows simple easy to use parallelization of Test::Unit and Rspec tests. Try the freshly opened up public beta, give your test suite a shot on Devver.
August 02, 2009
I got tired of shaving the yak every time I created a new app, so I set up a rails app template to not only install all the plugins I use (cucumber, rspec, resource_controller, authlogic, jrails, etc) but to generate a fully working, tested authentication system with cucumber features and rspec tests. Check out my full blog post on it.
July 12, 2009
JRubyist Dan Tylenda-Emmons just posted an article on JRuby Testing for Fun and Profit, which walks you through a set of tools for creating clean, elegant, understandable and maintainable tests with test/unit, RSpec and Shoulda.
May 15, 2009
authlogic_plugin create some matchers in RSpec for testing Authlogic the Remarkable way.
April 14, 2009
Ruby stubbing and mocking with rr: rr is a test double framework. This article provides an introduction to basic usage, assuming you are at least familiar with other frameworks like mocha, flexmock, and RSpec's mocking support
April 04, 2009
RSpec, Cucumber, Webrat, RCov and Autotest are a powerful combination of tools for testing your Rails app. Unfortunately getting them to all work nicely together can be a bit of challenge. I recently configured a development environment from scratch on OS X 10.5 Leopard and kept track of all of the little details. Continue Reading The Article...
April 02, 2009
Evolve your development processes by focusing on the behavior from the outside-in. Spend four days (June 2–5) learning Behavior Driven Development using RSpec and Cucumber in the context of a Ruby on Rails application. With ample one-on-one learning opportunities, you'll gain hands-on experience with the tools and techniques that drive BDD.
March 25, 2009
Share components between Rails apps with Git Submodules. Run-through includes setting up RSpec and autotest for your shared components.
March 18, 2009
Remarkable (a framework for Rspec matchers) 2.3 is out! Remarkable 2.2.x series was made of frequent releases with deprecation warnings to consolidate the API. Until we get into 2.3, we improved support for ActiveRecord validations, fixed some bugs and made some changes, so we are safe and clear to work on new features and new matchers.
March 11, 2009
I've been digging around for a good technique for identifying slow running tests after reading this article. I've been playing with ruby-prof and test timer, but I'm not happy with the results. It looks like this is possible with RSpec, but I can't find anything for Test::Unit. Help!
March 05, 2009
The latest version of Shoulda works with RSpec. Check out the announcement blog posts for ActiveRecord matchers (last month) and ActionController matchers (today).
February 24, 2009
Agile Ruby Tester - Check out this new blog for software test professionals working in Ruby. The blog covers agile testing experiences and insights, with special concentration on Ruby and Ruby-based tools (such as Watir and RSpec).
I am the developer of the blog...I'm a QA Engineer with 15 years experience. I've worked in several dynamic languages, including Groovy and Python (and have actually written a book on Python). I've found my home in Ruby, and this blog is my modest attempt to contribute to the test community and the Ruby community. Take a look, and let me know what you think.
I am the developer of the blog...I'm a QA Engineer with 15 years experience. I've worked in several dynamic languages, including Groovy and Python (and have actually written a book on Python). I've found my home in Ruby, and this blog is my modest attempt to contribute to the test community and the Ruby community. Take a look, and let me know what you think.
February 17, 2009
A tutorial on how to create Custom Argument Matchers in RSpec. Tells you how to add things like #with(array_including('a')) to complement the existing #with(hash_including(:key => val)).
January 30, 2009
The Pragmatic Programmers released a beta (PDF) version of The RSpec Book. The topics covered: RSpec, Cucumber, Behaviour Driven Development, BDD on Rails, RubySpec. The lead developer of RSpec, David Chelimsky, is one of the authors.
January 22, 2009
There's a relatively new player in the town of role-based access control for Rails - acl9 by Oleg Dashevskii. This article shows how easy it is to replace acl9's default database-based role checks with your own dynamic ones, and to allow your object to allow or deny users with any roles using any conditions without updating database roles all the time. And it does it in a true BDD fashion with RSpec examples. Read the article
January 09, 2009
"For a long time I was evangelizing Shoulda at Surgeworks and used it in my personal projects. The fact is, I didn’t have much success in convincing my co-workers to adopt Shoulda. On the other hand, they managed to convince me to learn and use RSpec. I got to like RSpec more and more, so I decided to adopt it as my official testing framework from now on. But I can no longer live without the resources that Shoulda offers me. So I decided to scratch my itch." Remarkable
December 31, 2008
To be fair, custom matchers in rspec are pretty easy as is: create a class that implements a few methods and then define a method to wrap that class.
Taking that one step further, with this simple script you can define your own custom matchers with a one liner:
Taking that one step further, with this simple script you can define your own custom matchers with a one liner:
matcher(:be_even) {|number| number % 2 == 0}
matcher(:be_divisible_by) {|n, d| n % d == 0}December 26, 2008
If you're between a rock and a hard place because you can't add Shoulda or RSpec dependencies to your tests, check out this solution using lambdas.
December 11, 2008
November 28, 2008
I translated a book "Life On The Edge With Merb, DataMapper & RSpec" into Japanese. This book is for beginners of Merb, DataMapper, and RSpec. Check it out if you are Japanese Merb beginner.
November 25, 2008
Garlic is a tool you can use within your rails plugin so you can run the plugin's tests against a combination of different dependencies: different versions of rails (2.0.2, 2.1.2, edge, etc), and different versions of gems etc. See sample pastie showing tests of a plugin against versions of rails + rspec: http://gist.github.com/28786
November 20, 2008
To my mind, the only thing missing from Test::Unit is an easy way to defer tests. So, here's a quick and dirty way to defer tests in your Rails app without loading up test/spec or RSpec or what have you.
November 18, 2008
Shnork is a fledgling project that can dive through your Sinatra website and make sure all your internal links resolve, without 404 or 500 errors. Today, Sinatra; soon, all Rack-based web applications will be able to Shnork! Use standalone, or as an RSpec spec.
November 04, 2008
We've stopped using RSpec... say Rails development team ENTP. They're now back to Test::Unit but improved with Jeremy McAnally's context. Others in the comments suggest shoulda. Is it curtains for RSpec?
October 31, 2008
Lakshan from the MyConf RailsRumble team has released an extended version of Bort the base Rails application named Extended-Bort.
What are the changes?
* Git Submodules are used to keep Rails and other plugins updated.
* Included Rails 2.2.0 with tha app
* Added annotate-models and make_resourceful plugins
* Added Action Mailer initializer and SMTP settings for production mode
* Uses admin email specified in settings.yml in exception notifier
* Replaced rSpec story runner with new Cucumber Scenario Framework (webrat and cucumber plguins are included)
* Replaced Prototype js with jQuery
* Replaced asset_packager with bundle_fu for bundling assets
* Changed Stylesheets by adding an initial stylesheet, application stylesheet and Hartija CSS print stylesheet
What are the changes?
* Git Submodules are used to keep Rails and other plugins updated.
* Included Rails 2.2.0 with tha app
* Added annotate-models and make_resourceful plugins
* Added Action Mailer initializer and SMTP settings for production mode
* Uses admin email specified in settings.yml in exception notifier
* Replaced rSpec story runner with new Cucumber Scenario Framework (webrat and cucumber plguins are included)
* Replaced Prototype js with jQuery
* Replaced asset_packager with bundle_fu for bundling assets
* Changed Stylesheets by adding an initial stylesheet, application stylesheet and Hartija CSS print stylesheet
October 14, 2008
A helper for testing access control with RSpec - built to simplify the testing of controller actions that need restricting.
October 13, 2008
"We ain't got no RSpec" - It’s the gift that keeps on giving; but this time it’s being regifted as a ringtone
October 10, 2008
The latest release of RunCodeRun - a hosted Continuous Integration service for Ruby and Rails - now supports public browsing of the open source projects that have been building there. Check out the build status and build histories for projects like RSpec, Shoulda, Tarantula, and others.
October 09, 2008
Here's an overview of some of the tools I've been using for behavior driven API development in Ruby.
August 22, 2008
Telling a good story - Rspec stories from the trenches. Real examples of Rpsec stories and some of the lessons learnt working with them.
