Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
8aa6948e
Commit
8aa6948e
authored
Feb 21, 2014
by
jonoterc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch deprecated "mock" for "double" in annotate specs
changing to get rid of deprecation warnings
parent
f9ebcded
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+3
-3
annotate_routes_spec.rb
spec/annotate/annotate_routes_spec.rb
+1
-1
No files found.
spec/annotate/annotate_models_spec.rb
View file @
8aa6948e
...
...
@@ -6,14 +6,14 @@ require 'annotate/active_record_patch'
describe
AnnotateModels
do
def
mock_class
(
table_name
,
primary_key
,
columns
)
options
=
{
:connection
=>
mock
(
"Conn"
,
:indexes
=>
[]),
:connection
=>
double
(
"Conn"
,
:indexes
=>
[]),
:table_name
=>
table_name
,
:primary_key
=>
primary_key
,
:column_names
=>
columns
.
map
{
|
col
|
col
.
name
.
to_s
},
:columns
=>
columns
}
mock
(
"An ActiveRecord class"
,
options
)
double
(
"An ActiveRecord class"
,
options
)
end
def
mock_column
(
name
,
type
,
options
=
{})
...
...
@@ -27,7 +27,7 @@ describe AnnotateModels do
stubs
.
merge!
(
options
)
stubs
.
merge!
(
:name
=>
name
,
:type
=>
type
)
mock
(
"Column"
,
stubs
)
double
(
"Column"
,
stubs
)
end
it
{
AnnotateModels
.
quote
(
nil
).
should
eql
(
"NULL"
)
}
...
...
spec/annotate/annotate_routes_spec.rb
View file @
8aa6948e
...
...
@@ -4,7 +4,7 @@ require 'annotate/annotate_routes'
describe
AnnotateRoutes
do
def
mock_file
(
stubs
=
{})
@mock_file
||=
mock
(
File
,
stubs
)
@mock_file
||=
double
(
File
,
stubs
)
end
it
"should check if routes.rb exists"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment