Skip to content

Instantly share code, notes, and snippets.

@kevn
Created January 3, 2012 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevn/1556757 to your computer and use it in GitHub Desktop.
Save kevn/1556757 to your computer and use it in GitHub Desktop.
Sample Test::Unit
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