When you render a nested form for a Movie which has_many :actors, you want to render the right number...

To test if you can connect to a host using password authentication and explicitly deny public key authentication:

If you stub a method or set expectations with should_receive these stubbed methods may also yield blocks. This is...

apidock.com

This is somewhat similar to the touch command of Linux: FileUtils.touch 'example.txt', :mtime => Time.now - 2.hours If you omit the :mtime...

When some of your Google contacts are no longer synchronized with your e-mail client or mobile phone, those contacts...

Sometimes, when running a rake task, RubyGems 1.8.5 raises an error: rake aborted! undefined method `specifications' for "/usr/lib/ruby/gems/1.8":String

My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on...

If you want to use a helper_method my_helper_method inside a model, you can write ApplicationController.helpers.my_helper...

Consider the following: describe '#something' do context 'with lots of required arguments' do it 'should work' do subject.something(:foo => 'foo...

When rendering a number, you want to pretty up the string coming from #to_s: Render 0.0 as 0

Because your examples should not change global state, you should not need to care about the order in which RSpec...

I encountered a bug in RSpec 1.x where stubbed class methods ("static methods") would not be unstubbed before the...

I pushed a new version of the Cucumber Factory gem. This new release lets you refer to a previously created...

makandra dev

Attached you can find an example ~/.ssh/config file which makes working with SSH more pleasant. It contains several tweaks:

geordi, our collection of awesome shell scripts, has been extended by three scripts to help you call RSpec or Cucumber...

(Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and...

You know there is the du command to fetch the disk usage of a directory (“.” in this example). By default...

When using the resource_controller gem you often hook onto events like this: update.before do do_something end

In order to request a SSL certificate from any dealer, you usually need a CSR certificate. As both the CSR...

This snippet makes links that refer to an anchor (like "...

...") scroll softly to it.\ In this example we only do...

schema.org

If you would like to enrich your website with semantic markup like contact data, places or events you should have...

devblog.imedo.de

XPath matchers can be combined with CSS-selector matchers. This is really useful if not, for example, the content of...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

You probably already manage servers you often connect to inside the ~/.ssh/config file. What is nice: you may define alias...