Action Mailer Basics and Previews Chapter "Task H1: Sending Mail" from Agile Web Development with Rails 7.2 (in our...

Learn to treat files as an ActiveRecord attribute type, like :string or :integer Research Look at the README for...

makandra Curriculum

In this card we will learn to write code that scales with a large number of database records. We will...

makandra Curriculum

Understand why we test: Low defect rate without a QA department. Customer acceptance testing can concentrate on new features...

relishapp.com

In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...

If you want to grow a Ruby Array, you might find out about #fill but it is not really what...

When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.

makandra dev

Now supports RSpec 3 and Rails 4 Drops support for state_machine, which has some issues with Rails 4 and...

makandra dev
relishapp.com

RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...

relishapp.com

To only stub a method call if a given argument is used, but use the default implementation for other arguments...

makandra dev
github.com

Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you...

Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...

github.com

Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...

makandra dev
api.rubyonrails.org

Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...

makandra dev

RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...

When putting phone numbers into web pages, you should use tel: links so smartphone users can click those numbers to...

Upgrading from Ruby 1.8.7 to 2.1.2 took me an hour for a medium-sized application. It involved hardly any changes...

This is what worked for me in a Rails 4: # JSON data as first argument, then parameters patch :update, { some...

Capybara will fail to find tags that are missing an href attribute. This will probably happen to you every now...

Though nowhere to be found in the official docs, this works just fine. describe Facebook::Post do it_behaves_like...

Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...