view · edit · sidebar · attach · print · history

20110207-testcases-export_oddbdat-oddb_org

<< | Index | >>


  1. Create test-cases for oddbdat_export.rb
  2. Create test-cases for exporter.rb (57% coverage)
  3. Update test-cases for exporter.rb (100% coverage)

Goal
  • Update test-cases export_oddbdat / 100%
Milestones
Initial skelton (test/test_plugin/oddbdat_export.rb)
  1. Test-cases for src/plugin/oddbdat_export.rb 9.30
  2. Test-cases for src/util/exporter.rb 9:50
Summary
Commits
ToDo Tomorrow
  • Move 'plugin' flexstub to setup method
  • finish test-case for exporter.rb
Keep in Mind
  1. Next Task Also probably Dose error ch.ODDB.org Report - Error: Generikaliste - 02/2011 ch.ODDB.org Report - Error: oddb.csv - 02/2011
  2. Add my email address to SL-Update recipients
  3. Debug bsv_followers autorun
  4. oddb.org test-case 100%
  5. Some concerns about FI news job
  6. Check rdbi instead of dbi for ODBA
  7. Encoding woes (from Davatz-san)
  8. Feedback: This option indicates that the regular expression is parsed as 'UTF8' (from Davatz-san)
  9. pg on Ubuntu - see http://dev.ywesee.com/wiki.php/Gem/Pg (from Davatz-san)
  10. On Ice
  11. emerge --sync

Create test-cases for oddbdat_export.rb

Initial skelton (test/test_plugin/oddbdat_export.rb)

#!/usr/bin/env ruby
# TestOddbDatExport -- oddb -- 07.02.2011 -- mhatakeyama@ywesee.com

$: << File.expand_path('..', File.dirname(__FILE__))
$: << File.expand_path("../../src", File.dirname(__FILE__))

require 'stub/oddbdat_export'
require 'test/unit'
require 'flexmock'


module ODDB
  module OdbaExporter
    class TestOddbDatExport < Test::Unit::TestCase
      include FlexMock::TestCase
      def test_export
        assert_equal(nil, false)
      end
    end
  end
end

Result

masa@masa ~/ywesee/oddb.org/test/test_plugin $ ruby oddbdat_export.rb 
Loaded suite oddbdat_export
Started
F
Finished in 0.000575 seconds.

  1) Failure:
test_export(ODDB::OdbaExporter::TestOddbDatExport) [oddbdat_export.rb:22]:
<nil> expected but was
<false>.

1 tests, 1 assertions, 1 failures, 0 errors

Next

  • Build it up

Attach:oddbdat_export.rb.20110207_1.txt

Result

masa@masa ~/ywesee/oddb.org/test/test_plugin $ ruby oddbdat_export.rb 
Loaded suite oddbdat_export
Started
...
Finished in 0.004423 seconds.

3 tests, 3 assertions, 0 failures, 0 errors

Check coverage

Create test-cases for exporter.rb

Initial skelton (test/test_util/exporter.rb)


Result

#!/usr/bin/env ruby
# TestExporter -- oddb -- 07.02.2011 -- mhatakeyama@ywesee.com

$: << File.expand_path("../../src", File.dirname(__FILE__))

require 'test/unit'
require 'flexmock'


module ODDB
  class TestExporter < Test::Unit::TestCase
    def test_export_oddbdat
      assert_equal(nil, false)
    end
  end
end

Result

masa@masa ~/ywesee/oddb.org/test/test_util $ ruby exporter.rb 
Loaded suite exporter
Started
F
Finished in 0.002461 seconds.

  1) Failure:
test_export_oddbdat(ODDB::TestExporter) [exporter.rb:14]:
<nil> expected but was
<false>.

1 tests, 1 assertions, 1 failures, 0 errors

Next

  • Build a test-case up (only for 'export_oddbdat' method)

Attach:export.rb.20110207_1.txt

Result

masa@masa ~/ywesee/oddb.org/test/test_util $ rcov exporter.rb 
[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility
             layer which provides a drop-in replacement for Spreadsheet::Excel
             versions <= 0.3.5.1. This code will be removed in Spreadsheet
             version 1.0.0

Loaded suite /usr/bin/rcov
Started
....
Finished in 0.007061 seconds.

4 tests, 6 assertions, 0 failures, 0 errors

Check coverage

Commit

Interim Summary

Update test-cases for exporter.rb (100% coverage)

Memo

Attach:export.rb.20110207_2.txt

Result

masa@masa ~/ywesee/oddb.org/test/test_util $ ruby exporter.rb 
[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility
             layer which provides a drop-in replacement for Spreadsheet::Excel
             versions <= 0.3.5.1. This code will be removed in Spreadsheet
             version 1.0.0

Loaded suite exporter
Started
.........
Finished in 0.041789 seconds.

9 tests, 8 assertions, 0 failures, 0 errors

Attach:exporter.rb.20110207_3.txt

Result

masa@masa ~/ywesee/oddb.org/test/test_util $ ruby exporter.rb 
[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility
             layer which provides a drop-in replacement for Spreadsheet::Excel
             versions <= 0.3.5.1. This code will be removed in Spreadsheet
             version 1.0.0

Loaded suite exporter
Started
..........................................
Finished in 0.115122 seconds.

42 tests, 35 assertions, 0 failures, 0 errors

Coverage

Note

  • Not yet commit
view · edit · sidebar · attach · print · history
Page last modified on February 07, 2011, at 04:56 PM