Last active
December 23, 2015 22:08
-
-
Save akinsgre/6700701 to your computer and use it in GitHub Desktop.
Revisions
-
akinsgre revised this gist
Sep 25, 2013 . 1 changed file with 2 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,7 @@ def after_initialize require 'mocha/setup' require 'employee_id' EmployeeID.any_instance.stubs(:Employee).returns(9999) end -
akinsgre created this gist
Sep 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ db_user.emp_id = EmployeeID.find_by_Username(login).Employee #Returns 9999 in script/console... but 1806 in script/server This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ def after_initialize require 'test/unit' require 'mocha/setup' require 'employee_id' # dbconfig = YAML.load(File.read('config/database.yml')) # ActiveRecord::Base.establish_connection dbconfig[ENV['RACK_ENV']||'development'] # @users = Array.new # user = User.new # user.login = 'akinsgp' # user.email = 'g.akins@insomna-consulting.org' # user.save # @users << user # User.stubs( :find_all_users_in_ad ).returns(@users) EmployeeID.any_instance.stubs(:Employee).returns(9999) puts "This sucks" end