lib/forgery/forgery/basic.rb in forgery-0.4.1 vs lib/forgery/forgery/basic.rb in forgery-0.4.2
- old
+ new
@@ -80,11 +80,11 @@
def self.number(options={})
options = {:at_least => 1,
:at_most => 10}.merge(options)
- Forgery::Extend((options[:at_least]..options[:at_most])).random
+ Forgery::Extend(options[:at_least]..options[:at_most]).random
end
def self.text(options={})
options = {:at_least => 10,
:at_most => 15,
@@ -98,10 +98,10 @@
allowed_characters += LOWER_ALPHA if options[:allow_lower]
allowed_characters += UPPER_ALPHA if options[:allow_upper]
allowed_characters += NUMERIC if options[:allow_numeric]
allowed_characters += SPECIAL_CHARACTERS if options[:allow_special]
- length = options[:exactly] || Forgery::Extend((options[:at_least]..options[:at_most])).random
+ length = options[:exactly] || Forgery::Extend(options[:at_least]..options[:at_most]).random
Forgery::Extend(allowed_characters).random_subset(length).join
end
def self.frequency