Sha256: bb97a7323a5bd74ebf931b3714e03593ba6b6f5dd4757384645713b8043b6ffa
Contents?: true
Size: 540 Bytes
Versions: 1
Compression:
Stored size: 540 Bytes
Contents
require 'minitest/autorun' require './lib/amazon_athena/commands/show_columns' describe AmazonAthena::Commands::ShowColumns do before do @cmd = AmazonAthena::Commands::ShowColumns.new("mydb.mytable") end it "provides a db statement" do assert_equal "SHOW COLUMNS IN mydb.mytable;", @cmd.statement end it "executes a query" do results = MiniTest::Mock.new results.expect(:map, nil) conn = MiniTest::Mock.new conn.expect(:query, results, ["SHOW COLUMNS IN mydb.mytable;"]) @cmd.run(conn) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
athena-cli-0.1.0 | test/lib/amazon_athena/commands/show_columns_test.rb |