move conditional inside module definition to make including a no-op when theres no active_record
Merge pull request #1028 from rspec/fix_1027

Fix issue when ActiveRecord isn't present.