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...
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...
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...
Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...
A comprehensive script to convert test suites from RSpec 2 to RSpec 3. This converts more than should/expect syntax.
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...
When you're developing a gem, never list the same dependency as both runtime and development dependency in your .gemspec...
You can configure RSpec 3.3+ to raise an error when attempting to stub or mock a non-existing method. We...
Built-in matchers Get an overview of all the matchers that are built into RSpec. Play with some of...
Web security basics Einführung in die Web Security 🇩🇪 provides essentials for the topic of this card. Read following chapters:
The easiest way to freeze or travel through time in a Jasmine spec is to use the built-in jasmine.clock...
Running projects parallel makes some trouble with PDF generation. Use geordi rspec spec to force sequential tests for the whole...
Get an idea of the varying support for HTML/CSS/JavaScript features in different browsers like Chrome, Firefox, Internet Explorer, Edge...