In general, you should not put a block element inside an inline element. So don't do this: text

Exercise 1: XML On the start page of your Movie DB, show the title of a random movie that is...

github.com

We have released a new library Gemika to help test a gem against multiple versions of Ruby, gem dependencies and...

makandra dev
github.com

Improve geordi cucumber: Only attempt @solo run when the specified files contain the @solo tag, skip @solo run if any...

Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages...

You want Spring for super-fast binstubs like bin/rails or bin/rspec which avoid Rails boot time. You want parallel_tests...

When you're nesting setTimeout(f, 0) calls, your browser will silently increase the delay to 5 milliseconds after the...

Resources Rails Guide: Internationalization API Guide to localizing a Rails application Locale-aware helpers in ActionView::Helpers::NumberHelper

Reading user input in console applications is usually done using Kernel#gets. Stubbing that can be a bit hairy.

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

relishapp.com

When you find yourself in the situation that you would like to define a custom matcher in your specs, but...

Expecting a primitive value as an argument to a method invocation is easy: expect(object).to receive(:foo).with('arg1...

gist.github.com

The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...

RSpec provides a nice diff when certain matchers fail. Here is an example where this diff is helpful while comparing...

Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...

RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...

If you expect method calls in RSpec 3, be aware that the argument matchers use very liberal equality rules (more...

Don't use be_true to check if a value is true. It actually checks if it anything other than...

makandra dev

Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...

github.com

A comprehensive script to convert test suites from RSpec 2 to RSpec 3. This converts more than should/expect syntax.

github.com

You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work.

Simply add this to your .rspec instead: --require spec_helper If you are on rspec >= 3 and use a rails_helper.rb...