Skip to content

Instantly share code, notes, and snippets.

@akinsgre
Last active December 23, 2015 22:08
Show Gist options
  • Save akinsgre/6700701 to your computer and use it in GitHub Desktop.
Save akinsgre/6700701 to your computer and use it in GitHub Desktop.
db_user.emp_id = EmployeeID.find_by_Username(login).Employee #Returns 9999 in script/console... but 1806 in script/server
def after_initialize
require 'test/unit'
require 'mocha/setup'
require 'employee_id'
EmployeeID.any_instance.stubs(:Employee).returns(9999)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment