We have a big flat screen TV (Samsung LE46c650l1kxxu) in our conference room. Configuring it properly, we were encountering some...

Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

en.wikipedia.org

Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...

If you're writing a spec for an application using Resque, you may need to work off queues manually without...

Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...

Ubuntu comes with keyboard layouts like "Germany Eliminate Dead Keys", which are practical for programming. If you need to type...

This finally works: User.any_instance.should_receive(...) as does User.any_instance.stub(...) Note: You won't have RSpec 2.6 if you're still working...

VirtualBox does not offer anything for this task -- you need to do it yourself. It's not that hard:

When you generate a URL in a mailer view, ActionMailer will raise an error unless you previously configured it which...

I've recently encountered a weird problem with specs making lots of SOLR queries using the acts_as_solr plugin...

If you stub a method or set expectations with should_receive these stubbed methods may also yield blocks. This is...

When some of your Google contacts are no longer synchronized with your e-mail client or mobile phone, those contacts...

Sometimes, when running a rake task, RubyGems 1.8.5 raises an error: rake aborted! undefined method `specifications' for "/usr/lib/ruby/gems/1.8":String

Consider the following: describe '#something' do context 'with lots of required arguments' do it 'should work' do subject.something(:foo => 'foo...

yehudakatz.com

Yesterday, there was a blog post entitled “What the Hell is Happening to Rails” that stayed at the number one...

Because your examples should not change global state, you should not need to care about the order in which RSpec...

I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the...

geordi, our collection of awesome shell scripts, has been extended by three scripts to help you call RSpec or Cucumber...

(Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and...

When using the resource_controller gem you often hook onto events like this: update.before do do_something end

Note: In Rails 3+ you can use Array.wrap instead of the solution here. In the past you could use Array...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

You probably already manage servers you often connect to inside the ~/.ssh/config file. What is nice: you may define alias...