Created
January 3, 2012 20:26
-
-
Save kevn/1556757 to your computer and use it in GitHub Desktop.
Sample Test::Unit
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 'test/unit' | |
class FooTest < Test::Unit::TestCase | |
def setup | |
# puts "Do stuff before tests" | |
@foo = 'messages.csv' | |
@lines = download_export('a', 'b', 'c') | |
end | |
def test_data_extract_download | |
# puts "Downloading...." | |
assert_equal 'messages.csv', @foo, "Filename should match" | |
@lines.each do | |
assert true | |
end | |
end | |
def test_foo_bar | |
assert true, "Foo bar should be working!" | |
end | |
def test_foo_bar_bat | |
assert false, "Foo bar bat should be working!" | |
end | |
def download_export(foo, x, zya) | |
# curl stuff | |
[ | |
['a', 'b', 'c'], | |
['d', 'e', 'f'], | |
] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment