Sha256: e1fffee64a196e231f1433a15c877dfa846e2508c97454323489af745ccf2973

Contents?: true

Size: 883 Bytes

Versions: 8

Compression:

Stored size: 883 Bytes

Contents

require 'helper'

class TestCli < Test::Unit::TestCase
  def test_xml
    a = Shell.execute! %{mysql2xml --user=#{@options[:user]} --password=#{@options[:password]} --database=#{@options[:database]} --execute="#{@options[:execute]}"}
    assert a.stdout.include?('Acura')
    assert !a.stdout.include?('DaimlerChrysler')
  end
  
  def test_json
    a = Shell.execute! %{mysql2json --user=#{@options[:user]} --password=#{@options[:password]} --database=#{@options[:database]} --execute="#{@options[:execute]}"}
    assert a.stdout.include?('Acura')
    assert !a.stdout.include?('DaimlerChrysler')
  end
  
  def test_csv
    a = Shell.execute! %{mysql2csv --user=#{@options[:user]} --password=#{@options[:password]} --database=#{@options[:database]} --execute="#{@options[:execute]}"}
    assert a.stdout.include?('Acura')
    assert !a.stdout.include?('DaimlerChrysler')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mysql2xxxx-0.2.1 test/test_cli.rb
mysql2xxxx-0.2.0 test/test_cli.rb
mysql2xxxx-0.1.1 test/test_cli.rb
mysql2xxxx-0.1.0 test/test_cli.rb
mysql2xxxx-0.0.4 test/test_cli.rb
mysql2xxxx-0.0.3 test/test_cli.rb
mysql2xxxx-0.0.2 test/test_cli.rb
mysql2xxxx-0.0.1 test/test_cli.rb