metamaps--metamaps/spec/spec_helper.rb

20 lines
558 B
Ruby
Raw Normal View History

RSpec.configure do |config|
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
2015-12-16 14:33:29 +00:00
# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
# particularly slow.
config.profile_examples = 10
end
2015-10-19 07:23:07 +00:00
def random_string(length = 10)
2015-12-16 14:19:58 +00:00
o = [('a'..'z'), ('A'..'Z')].map(&:to_a).flatten
2015-12-16 14:33:29 +00:00
(0...length).map { o[rand(o.length)] }.join
2015-10-19 07:23:07 +00:00
end