Module: TheArrayComparator::TestingHelper
- Defined in:
- lib/the_array_comparator/testing_helper.rb,
lib/the_array_comparator/testing_helper/data_set.rb,
lib/the_array_comparator/testing_helper/test_data.rb
Overview
helper for tests
Defined Under Namespace
Instance Method Summary collapse
-
#generate_testdata(options) ⇒ Array
Generate data for the tests.
Instance Method Details
#generate_testdata(options) ⇒ Array
Generate data for the tests
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/the_array_comparator/testing_helper.rb', line 21 def generate_testdata() opts = { keywords: [], raw_data: [], count_of_data: 100, }.merge raw_data = [:raw_data] || Faker::Lorem.sentences(opts[:count_of_data]) dataset = DataSet.new([:keywords],raw_data) testdata = TestData.new(dataset) testdata.generate end |