This is what worked for me in a Rails 4: # JSON data as first argument, then parameters patch :update, { some...
You either have an old version of Mocha and an edge version of Rails 3.2, or you have a new...
Show failing specs instantly. Show passing spec as green dots as usual. Configuration: # spec/spec.opts (.rspec for rspec 2) --require rspec/instafail...
Now supports RSpec 3 and Rails 4 Drops support for state_machine, which has some issues with Rails 4 and...
You can use CSS attribute selectors in your step definitions like this: Then /^the page should have a meta description...
Since Ruby 3.2.0 you can measure coverage support for eval statements and support has been added for the simplecov gem...
Take care when trying to set attributes to nil in a blueprint. Given the following master blueprint: Story.blueprint do
When you regularly make use of Cucumber's "show me the page" step (or let pages pop up as errors...
RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...
...the best practice to hide background tasks behind a single static methods you can test, this is probably preferable to defining additional Rake tasks. Unfortunately when whenever register a runner...
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...
Unfortunately, by default plugin tests are pretty bland. They use the plain unit test suite supplied by Ruby, and not any of the extended Rails test framework. This will leave...
...our plugin’s test classes with no access to fixtures, database.yml configuration, or any of those nice class auto-loading features...
One really simple way to check whether JavaScript Sentry integration was successful (raven-js or @sentry/browser), is to create an...
If you use rails_admin, your specs pass with the rspec binary, but not using rake spec (or rake parallel...
If you need to debug Analytics tracking, consider using this chrome extension. It will replace the tracking code with a...
Chances are, something in your project uses the mathn library, which is known to cause infinite loops when rendering the...
To check your apache2 config files for syntax errors run sudo apache2ctl configtest or shorter sudo apache2ctl -t
When a Ruby version gem has a letter in its version number, it is considered a pre-release:
You can publish pre-release versions of an npm package. Naming convention for pre-release versions An npm package must...
Simply add --dry-run, like this: sudo apt-get install --dry-run something This is great if packages would get...
You can now define this step without Cucumber raising Cucumber::Ambiguous: Then /^I should see "whatever I want"$/ do ...
This didn't work for me. Seems display is already taken in Machinist. # in spec/support/blueprints.rb Partner.blueprint do company_name
Background allows you to add some context to the scenarios in a single feature. A Background is much like a...
We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...