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...
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...
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...
When your cucumber features grow massively over time, the test execution can take a lot of time.
We recently decided to put static content for HouseTrip.com to Amazon Cloudfront for a faster user experience. This happens fully...
Run rspec-and-cucumber from any project directory to run both RSpec and Cucumber. If available, rspec_spinner or cucumber...
If you want to play music or sounds from a browser, your choice is to use either Flash or the...
When storing floating-point numbers such as prices or totals in an SQL database, always use a DECIMAL column. Never...
ActiveRecord models know how to cast a given string to the type of a given attribute (or column).
The Basic Authentication header encodes username and password. Effectively, it's just Base64 plus a "Basic" prefix.
I prefer using Opera's "User mode" to toggle an outlining of HTML elements quickly. This helps greatly when you...
Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.
mitmproxy is an SSL-capable, intercepting HTTP proxy. It provides a console interface that allows traffic flows to be inspected...
Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...