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'))
Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...
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...
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...
If in your application your users pass along params that result in filenames, like invoices/generated?number=123. This could be...
The attached RSpec matcher exist_in_database checks if a given record still exists in the database and has not...
We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...
If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...
track down warnings and to see failing specs immediately or to get an overview of the core...
So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...
If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...
Although you can access many symbols using the AltGr key you may be missing some, like the en-dash (–) or...
A while ago we were working on an application that had an entire version specially created for mobiles, such as...
Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.
Paperclip uses the imagemagick resize options like 100x50> , 100x50<, 100x50# etc to resize images. See the link what options are...
What are Google’s plans for turning WebM into a genuinely open standard, one that is based on consensus like...
To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...
If you find yourself working in the Adobe Flash IDE you're already doing it wrong, but maybe the hour...
If you run specs or your application and get an error like: ActionController::MissingFile in 'ProductsController#show, should render PDF...
You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.
When defining a trait using the Modularity gem, you must take extra steps to define constants to avoid caveats (like...