use closure scope locals rather than ivars (eliminates warnings, Im not sure why the ivars are bing lost)
check defined rather than nil
eliminates deprecation warning if secret_key_base is available but unusued
Merge pull request #830 from rspec/fix_warnings

Fix up some warnings