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
2c01787d
Commit
2c01787d
authored
Oct 26, 2015
by
Kamil Bielawski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset options before running each spec
parent
7d535d4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
annotate.rb
lib/annotate.rb
+6
-0
annotate_models_spec.rb
spec/annotate/annotate_models_spec.rb
+1
-0
No files found.
lib/annotate.rb
View file @
2c01787d
...
...
@@ -78,6 +78,12 @@ module Annotate
return
options
end
def
self
.
reset_options
[
POSITION_OPTIONS
,
FLAG_OPTIONS
,
PATH_OPTIONS
,
OTHER_OPTIONS
].
flatten
.
each
do
|
key
|
ENV
[
key
.
to_s
]
=
nil
end
end
def
self
.
skip_on_migration?
ENV
[
'skip_on_db_migrate'
]
=~
TRUE_RE
end
...
...
spec/annotate/annotate_models_spec.rb
View file @
2c01787d
...
...
@@ -479,6 +479,7 @@ end
mock_column
(
:name
,
:string
,
:limit
=>
50
)
])
@schema_info
=
AnnotateModels
.
get_schema_info
(
@klass
,
"== Schema Info"
)
Annotate
.
reset_options
end
def
write_model
file_name
,
file_content
...
...
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