Commit 2c01787d by Kamil Bielawski

Reset options before running each spec

parent 7d535d4b
...@@ -78,6 +78,12 @@ module Annotate ...@@ -78,6 +78,12 @@ module Annotate
return options return options
end 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? def self.skip_on_migration?
ENV['skip_on_db_migrate'] =~ TRUE_RE ENV['skip_on_db_migrate'] =~ TRUE_RE
end end
......
...@@ -479,6 +479,7 @@ end ...@@ -479,6 +479,7 @@ end
mock_column(:name, :string, :limit => 50) mock_column(:name, :string, :limit => 50)
]) ])
@schema_info = AnnotateModels.get_schema_info(@klass, "== Schema Info") @schema_info = AnnotateModels.get_schema_info(@klass, "== Schema Info")
Annotate.reset_options
end end
def write_model file_name, file_content def write_model file_name, file_content
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment