before

RSpec : want to have many tests for one shot method, including fixtures

Hello, I'm working on a Rails app. I want to test with rspec my method "start!" of my model Backup. So here the specs (all are methods, too): Backup should copy files to folder /backups Backup should check md5 sum Backup should delete original files For my tests, I create fake files, based on fixtures : MyFile.all.each{|r| system(...

Running JavaScript function before page load (setting background of appropriate size)

I've got an image background which content I want to be always visible, no matter what is the user's resolution. Therefore, I want to be able to determine what is the resolution and set appropriate background image file before page loads, on the very beginning. Is it possible somehow? ...

How to make a MySQL trigger run only when at least one OLD field is different from NEW fields ?

Hi, I am trying to audit table changes on MySQL but i want the "before update" trigger to run (add a line into an audit table) only when there is at least one changed field. Is there a way to easily check all fields for changes between OLD and NEW ? Thank you ! ...