spec/spec_helper.rb in sqlserver-sequence-0.2.0 vs spec/spec_helper.rb in sqlserver-sequence-0.3.0
- old
+ new
@@ -25,5 +25,19 @@
START WITH 1
INCREMENT BY 1
INSERTSEQUENCESQL
end
end
+
+RSpec.configure do |config|
+ config.include Sqlserver::Sequence::Testing::ModelMacros
+
+ config.before :each do
+ @spawned_models = []
+ end
+
+ config.after :each do
+ @spawned_models.each do |model|
+ Object.instance_eval { remove_const model } if Object.const_defined?(model)
+ end
+ end
+end