Skip to content

Instantly share code, notes, and snippets.

@oivoodoo
Last active April 3, 2017 06:40
Show Gist options
  • Save oivoodoo/72445b5cbf6e2cec109dab3f4c78a63e to your computer and use it in GitHub Desktop.
Save oivoodoo/72445b5cbf6e2cec109dab3f4c78a63e to your computer and use it in GitHub Desktop.
Example
require 'spec_helper'
describe 'example' do
before do
execute_query [
load_data("test.table1", "table1", "fixtures/example/table1.txt", []),
"TRUNCATE TABLE table2;"
]
end
context 'when something' do
it 'should populate table2 using table1' do
execute path_for('example.hql'), :hive => { 'date' => '2017-01-05' }
verify_data = fetch_query "SELECT id, name FROM table2"
expect(verify_data.size).to eq(1)
expect(verify_data).to include(["351804001", "facebook.com.some_fb_id", "2017-01-05"])
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment