Created
June 1, 2009 18:17
-
-
Save r00k/121637 to your computer and use it in GitHub Desktop.
This file contains 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
# test/unit/import_trials_test.rb | |
def test_import | |
search_string = "search string" | |
inst_name = "institution name" | |
Trial.expects(:create_trials_from_xml).with(DownloadTrials::OUTPUT_DIRECTORY, inst_name) | |
ImportTrials.import(inst_name, search_string) | |
end | |
# test/unit/trial_test.rb | |
def test_create_trials_from_xml | |
xml_trials_dir = File.dirname(__FILE__) + '/../fixtures/files/xml_trials/' | |
inst_name = 'Dana Farber Cancer Institute' | |
assert_difference 'Trial.count', 3 do | |
Trial.create_trials_from_xml(xml_trials_dir, inst_name) | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment