We just made this pull request to Timecop:
“Add Timecop#lens where time can go FASTER”
Create a new mock_type, :lens which will let time continue, like :travel, but the first argument is a scaling factor which will make time move at an accelerated pace.
If you are using ActiveAdmin, beware that the
after_save callback gets fired both when the model gets saved, and when there are validation errors on the model.
It really behaves like a callback after the model
save method gets called, regardless of its return value.
- Testing RailsAdmin custom actions
Let’s say you’re writing a RailsAdmin custom action, and you want to test it with a request spec.
If the test passes when guard is on, but fails when guard is off, then you’ve forgotten that the RailsAdmin initializer does not run when loading a rake task. It does run as part of bundle exec guard start.
This is a performance ‘optimization’ that RailsAdmin adds.
To turn it back on, so you can test custom actions:
task :default => [:load_rails_admin_initializer]
task :load_rails_admin_initializer do
ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = ‘false’
- International Talk Like a Pirate Day!
Arrrgggggg me mateys! To your pairs you scabrous dogs!
“How do I choose the value of a select box programmatically? The val function does not seem to do the trick.”
Try setting the desired option as selected and then trigger a change event on the select input.
*”A pair is looking for ‘multi file upload via iframe-transport’ expertise. Specifically uploads in FireFox 3.6.”
- The latest RubyMine EAP has improved code formatting options!