spec/support/gridfs.rb in mongo-2.11.0.rc0 vs spec/support/gridfs.rb in mongo-2.11.0
- old
+ new
@@ -91,18 +91,15 @@
# @since 2.1.0
attr_reader :description
# Instantiate the new spec.
#
- # @example Create the spec.
- # Spec.new(file)
+ # @param [ String ] test_path The path to the file.
#
- # @param [ String ] file The name of the file.
- #
# @since 2.1.0
- def initialize(file)
- @spec = YAML.load(ERB.new(File.new(file).read).result)
- @description = File.basename(file)
+ def initialize(test_path)
+ @spec = YAML.load(File.read(test_path))
+ @description = File.basename(test_path)
@data = @spec['data']
end
# Get a list of Tests for each test definition.
#