Permalink
Browse files

fix invalid syntax and sqlite rake failing tests

  • Loading branch information...
1 parent a6cda54 commit 7fd77474970fb170f26b56a6b38ef1a19cd816f9 Francesco Rodriguez committed Jun 18, 2012
@@ -25,7 +25,6 @@ def drop
FileUtils.rm(file) if File.exist?(file)
end
-
alias :purge :drop
private
@@ -37,4 +36,6 @@ def configuration
def root
@root
end
- end
+ end
+ end
+end
@@ -176,4 +176,4 @@ def test_recreates_database_with_the_given_options
)
end
end
-end
+end
@@ -132,4 +132,4 @@ def test_establishes_connection
ActiveRecord::Tasks::DatabaseTasks.purge @configuration
end
end
-end
+end
@@ -4,7 +4,7 @@
module ActiveRecord
class SqliteDBCreateTest < ActiveRecord::TestCase
def setup
- @database = "db_create.sqlite3"
+ @database = 'db_create.sqlite3'
@connection = stub :connection
@configuration = {
'adapter' => 'sqlite3',
@@ -77,6 +77,7 @@ def test_creates_path_from_database
end
def test_removes_file_with_absolute_path
+ File.stubs(:exist?).returns(true)
@path.stubs(:absolute?).returns(true)
FileUtils.expects(:rm).with('/absolute/path')
@@ -94,11 +95,12 @@ def test_generates_absolute_path_with_given_root
end
def test_removes_file_with_relative_path
+ File.stubs(:exist?).returns(true)
@path.stubs(:absolute?).returns(false)
FileUtils.expects(:rm).with('/former/relative/path')
ActiveRecord::Tasks::DatabaseTasks.drop @configuration, '/rails/root'
end
end
-end
+end

0 comments on commit 7fd7747

Please sign in to comment.