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

makandra dev

In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside...

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

I got this error when running Rails 2.3 tests for Rails LTS. More stacktrace: NoMethodError: undefined method `cache' for Gem...

makandra dev

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

github.com

Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...

github.com

Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation

makandra dev

Ever wondered how you can create a simple table output in bash? You can use the tool column for creating...

github.com

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

Once Rails knows a given string is html_safe, it will never escape it. However, there may be times when...

makandra dev
github.com

Remove some old binaries (commands still exist in geordi) and mark others as deprecated Rewrite deploy command to support...

Until recently, you could open a new tab via window.open when using execute_script in Selenium tests. It no longer...

Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...

github.com

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

Ruby has the class Proc which encapsulates a "block of code". There are 2 "flavors" of Procs: Those with "block...

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

keycdn.com

Table of contents of the linked article: What are Web Fonts? Advantages of Web Fonts Disadvantages of Web Fonts

mail-tester.com

You can use mail-tester.com to check your application's e-mails for issues that might cause e-mails to be...

makandra dev
github.com

Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...

Sometimes you just want to have a small web server that serves files to test something. Serve the current directory...

When you're developing a gem, never list the same dependency as both runtime and development dependency in your .gemspec...

While you can use Apache as a reverse proxy, it tries to be too smart. Try nginx instead, it's...

makandra dev
stackoverflow.com

git rebase -i -> mark your commit with edit git reset HEAD~ (remove the marked commit, but keep its...