Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

February 13 2014

February 04 2010

joshknowles's rspec-on-rails-matchers at master - GitHub

A collection of RSpec matchers to be used with the Ruby on Rails project
Tags: rspec rails

September 02 2009

Stubbing Chained Methods with Rspec - Stack Overflow

Client.stub!(:named_scope).and_return(@clients = mock([Client])) @clients.stub!(:first).and_return(@client = mock(Client))

July 20 2009

Mocking/Stubbing partials and helper methods in RSpec view specs

In my previous post I whined about not knowing how to mock/stub partials and helper methods in RSpec view specs. Now I have the answer and I’d like to thank the RSpec users mailing list and David Chelimsky for taking my phone call.

July 16 2009

vandrijevik's with_time_frozen_at at master - GitHub

with_time_frozen_at makes time-sensitive testing using Test::Unit in Ruby super-easy!

June 04 2009

the rails loft - matchers_in_have_tag_blocks.should be(/with_tag/)

Unfortunately, calling have_tag within a have_tag block won't raise an error. There's no mechanism that will warn you that your inner have_tag is ineffective. The results of the inner have_tag will simply be ignored.
Tags: rails rspec ruby

Using rspec have_tag | Ruby Pond

Not everyone realises that that rspec havetag assertion is simply a wrapper for the Test::Unit assertselect. And even if you do, do you really know how powerful a tool it is? I’ve seen many tests and specs where people jump through a whole heap of hoops to check that the desired element exists, well no more! Fresh for today, a quick run down on some of the most useful and powerful selectors you can use with havetag (and by default, assertselect too)
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!