Kouhei Sutou
null+****@clear*****
Sun Aug 17 12:24:10 JST 2014
Kouhei Sutou 2014-08-17 12:24:10 +0900 (Sun, 17 Aug 2014) New Revision: 260b10836b6bec8db74bc114ca18055ea8207021 https://github.com/ranguba/rroonga/commit/260b10836b6bec8db74bc114ca18055ea8207021 Message: test: ensure closing database that related with file Modified files: test/test-context.rb Modified: test/test-context.rb (+9 -5) =================================================================== --- test/test-context.rb 2014-08-17 12:23:27 +0900 (44472ca) +++ test/test-context.rb 2014-08-17 12:24:10 +0900 (633fc14) @@ -49,13 +49,17 @@ class ContextTest < Test::Unit::TestCase end def test_open_database - database = Groonga::Database.create(:path => @database_path.to_s) - database.close - + create_context = Groonga::Context.new + database = nil + create_context.create_database(@database_path.to_s) do |_database| + database = _database + end assert_predicate(database, :closed?) + create_context.close + called = false - context = Groonga::Context.new - context.open_database(@database_path.to_s) do |_database| + open_context = Groonga::Context.new + open_context.open_database(@database_path.to_s) do |_database| database = _database assert_not_predicate(database, :closed?) called = true -------------- next part -------------- HTML����������������������������...Download