File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ def drop
25
25
26
26
FileUtils . rm ( file ) if File . exist? ( file )
27
27
end
28
-
29
28
alias :purge :drop
30
29
31
30
private
@@ -37,4 +36,6 @@ def configuration
37
36
def root
38
37
@root
39
38
end
40
- end
39
+ end
40
+ end
41
+ end
Original file line number Diff line number Diff line change @@ -176,4 +176,4 @@ def test_recreates_database_with_the_given_options
176
176
)
177
177
end
178
178
end
179
- end
179
+ end
Original file line number Diff line number Diff line change @@ -132,4 +132,4 @@ def test_establishes_connection
132
132
ActiveRecord ::Tasks ::DatabaseTasks . purge @configuration
133
133
end
134
134
end
135
- end
135
+ end
Original file line number Diff line number Diff line change 4
4
module ActiveRecord
5
5
class SqliteDBCreateTest < ActiveRecord ::TestCase
6
6
def setup
7
- @database = " db_create.sqlite3"
7
+ @database = ' db_create.sqlite3'
8
8
@connection = stub :connection
9
9
@configuration = {
10
10
'adapter' => 'sqlite3' ,
@@ -77,6 +77,7 @@ def test_creates_path_from_database
77
77
end
78
78
79
79
def test_removes_file_with_absolute_path
80
+ File . stubs ( :exist? ) . returns ( true )
80
81
@path . stubs ( :absolute? ) . returns ( true )
81
82
82
83
FileUtils . expects ( :rm ) . with ( '/absolute/path' )
@@ -94,11 +95,12 @@ def test_generates_absolute_path_with_given_root
94
95
end
95
96
96
97
def test_removes_file_with_relative_path
98
+ File . stubs ( :exist? ) . returns ( true )
97
99
@path . stubs ( :absolute? ) . returns ( false )
98
100
99
101
FileUtils . expects ( :rm ) . with ( '/former/relative/path' )
100
102
101
103
ActiveRecord ::Tasks ::DatabaseTasks . drop @configuration , '/rails/root'
102
104
end
103
105
end
104
- end
106
+ end
You can’t perform that action at this time.
0 commit comments