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 characters
require "prawn/core" | |
require "prawn/layout" | |
include ActionView::Helpers::NumberHelper | |
class PrintableDrugRecord < Prawn::Document | |
attr_accessor :drug_record | |
PAGE_WIDTH = 560 | |
LEFT_COL_WIDTH = 330 | |
RIGHT_COL_WIDTH = 210 |
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 characters
require File.dirname(__FILE__) + '/../test_helper' | |
require "reports_controller" | |
include AuthSys | |
class ReportsControllerTest < ActionController::TestCase | |
def setup | |
@u_admin_gmg = new_test_user(:role => roles(:admin), :partner => partners(:gmg)) | |
@account = new_test_account | |
@inbound = Inbound.create(:account => @account, :file_name => "test.csv", :run_code => @runcode) |
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 characters
# input is "hello", function should return "olleh" | |
def reverse_string(input) | |
begin | |
if input | |
modified_input = input.to_s | |
str_size = (modified_input.size - 1) | |
end_string = [] | |
modified_input.each_char do |this| | |
end_string[str_size] = this |
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 characters
require File.dirname(__FILE__) + '/../test_helper' | |
require "resources_controller" | |
class ResourcesControllerTest < ActionController::TestCase | |
def setup | |
@u_admin_gmg = new_test_user(:role => roles(:admin), :partner => partners(:gmg)) | |
end | |
test "index with current_user" do |
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 characters
ENV["RAILS_ENV"] = "test" | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
require 'test_help' | |
class ActiveSupport::TestCase | |
self.use_transactional_fixtures = true | |
self.use_instantiated_fixtures = false | |
fixtures :all |
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 characters
require File.dirname(__FILE__) + '/../test_helper' | |
require 'xmlsimple' | |
class ReportMethodsTest < ActiveSupport::TestCase | |
fixtures :roles, :partners | |
def setup | |
@u_admin_gmg = new_test_user(:role => roles(:admin), :partner => partners(:gmg)) | |
@u_admin = new_test_user(:role => roles(:admin), :partner => partners(:other)) |
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 characters
desc 'Process daily.' | |
require 'ftps_implicit' | |
include Gmg | |
require "fastercsv" | |
namespace :testing do | |
task :gmg_api do | |
puts "\n\n\n TESTING gmg_api CONNECT \n\n\n" |
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 characters
desc 'Checkins.' | |
task :ci do | |
comment = "" | |
while comment.blank? | |
$stdout.write "comment: " | |
comment = $stdin.gets | |
end | |
puts "Running tests..." |
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 characters
CURSOR cur_TARGET_COMPANIES (s_target_string VARCHAR2) IS | |
SELECT COLUMN_VALUE | |
FROM table(split(s_target_string)); |
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 characters
create or replace function join | |
( | |
p_cursor sys_refcursor, | |
p_del varchar2 := ',' | |
) return varchar2 | |
is | |
l_value varchar2(32767); | |
l_result varchar2(32767); | |
begin | |
loop |