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...

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...

apidock.com

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.

makandra dev
mitmproxy.org

mitmproxy is an SSL-capable, intercepting HTTP proxy. It provides a console interface that allows traffic flows to be inspected...

benmabey.com

Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...

When you write a custom RSpec matcher a good place to store them is to create one file per matcher...

To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne'))

jeffkreeftmeijer.com

Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...

makandra dev

The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...

Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if...