spec/support/crud.rb in mongo-2.3.1 vs spec/support/crud.rb in mongo-2.4.0.rc0
- old
+ new
@@ -167,9 +167,24 @@
# @since 2.0.0
def requires_2_6?(write_command_enabled, collection)
!write_command_enabled && @operation.requires_2_6?(collection)
end
+ # Whether this operation requires a certain server version to be run.
+ #
+ # @example Determine whether this operation requires a certain server feature.
+ # operation.feature_enabled?(collection)
+ #
+ # @param [ Collection ] collection The collection the operation
+ # should be executed on.
+ #
+ # @return [ true, false ] Whether this operation requires a certain server version.
+ #
+ # @since 2.4.0
+ def feature_enabled?(collection)
+ @operation.feature_enabled?(collection)
+ end
+
private
def outcome_collection_data
@outcome['collection']['data'] if @outcome['collection']
end