Skip to content

Commit 8aa6948

Browse files
committed
switch deprecated "mock" for "double" in annotate specs
changing to get rid of deprecation warnings
1 parent f9ebcde commit 8aa6948

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/annotate/annotate_models_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
describe AnnotateModels do
77
def mock_class(table_name, primary_key, columns)
88
options = {
9-
:connection => mock("Conn", :indexes => []),
9+
:connection => double("Conn", :indexes => []),
1010
:table_name => table_name,
1111
:primary_key => primary_key,
1212
:column_names => columns.map { |col| col.name.to_s },
1313
:columns => columns
1414
}
1515

16-
mock("An ActiveRecord class", options)
16+
double("An ActiveRecord class", options)
1717
end
1818

1919
def mock_column(name, type, options={})
@@ -27,7 +27,7 @@ def mock_column(name, type, options={})
2727
stubs.merge!(options)
2828
stubs.merge!(:name => name, :type => type)
2929

30-
mock("Column", stubs)
30+
double("Column", stubs)
3131
end
3232

3333
it { AnnotateModels.quote(nil).should eql("NULL") }

spec/annotate/annotate_routes_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
describe AnnotateRoutes do
55

66
def mock_file(stubs={})
7-
@mock_file ||= mock(File, stubs)
7+
@mock_file ||= double(File, stubs)
88
end
99

1010
it "should check if routes.rb exists" do

0 commit comments

Comments
 (0)