spec/support/macros.rb in mongo-2.18.0.beta1 vs spec/support/macros.rb in mongo-2.18.0
- old
+ new
@@ -12,7 +12,17 @@
example.run
Mongo.send("#{key}=", existing)
end
end
+
+ def with_config_values(key, *values, &block)
+ values.each do |value|
+ context "when #{key} is #{value}" do
+ config_override key, value
+
+ class_exec(value, &block)
+ end
+ end
+ end
end
end