If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...
The first thing you need to understand is that the purpose of refinements in Ruby 2.0 is to make monkey...
This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation...
Plugins (and gems) are typically tested using a complete sample rails application that lives in the spec folder of the...
To install webmock 1.5.0: sudo gem install webmock --version "=1.5.0" or sudo gem install webmock -v "=1.5.0"
If a controller action responds to other formats than HTML (XML, PDF, Excel, JSON, ...), you can reach that code in...
You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...
Be careful when using params.merge as params is a HashWithIndifferentAccess. Why? Usually this should not be an issue but it...
When using form_for you can give the form's target URL either as a string or an array:
If you need to look at the list of methods that are called upon certain events (like before/after saving etc...
Take care when trying to set attributes to nil in a blueprint. Given the following master blueprint: Story.blueprint do
Lately, we’ve been exploring ways to offer web apps that perform like native apps on mobile devices. For this...
Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...
If you get an error message like that you are missing the Aspell files a specific language:
Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...
RSpec's context (which is basically an alias for describe) takes over your whole application. No object may have its...
In /etc/crontab In /etc/cron.d/* In /etc/cron.hourly/* In /etc/cron.daily/* In /etc/cron.weekly/* In /etc/cron.monthly/* In the personal crontab of any user. This...
You can use record.send(:update_without_callbacks) or record.send(:create_without_callbacks) This can be used as a...
With its you can switch the subject of an example to a method value of the current subject: describe Array...
Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']) or a hash (:conditions => { 'state' => 'draft...
To only run a single describe/context block in a long spec, you can say spec spec/models/note_spec.rb:545 ... where the describe...
If you need to find all files inside a directory that were modified in the last 24 hours you can...
This will show you how to create a RSS feed that the Feed Validator considers valid. Note that RSS is...
You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...