spec/support/helpers/feature_helpers.rb
def generate_entries(count: nil, dates: [])
    n = count || dates.count
    n.times do |i|
      date = dates[i].to_date || Faker::Date.before(1.week.ago)
      shift = create(:shift, day: date)
      create(:shift_event, shift: shift)
    end
  end
# Creates n shift events. If dates is specified, it assigns the listed dates
# to the created events.
Creates n shift events. If dates is specified, it assigns the listed dates
to the created events.
Creates n shift events . If dates is specified it assigns the listed dates to the created events .
def generate_entries(count: nil, dates: [])
    n = count || dates.count
    n.times do |i|
      date = dates[i].to_date || Faker::Date.before(1.week.ago)
      shift = create(:shift, day: date)
      create(:shift_event, shift: shift)
    end
  end
def generate_entries ( count : nil , dates : [ ] ) n = count || dates . count n . times do | i | date = dates [ i ] . to_date || Faker :: Date . before ( 1 . week . ago ) shift = create ( :shift , day : date ) create ( :shift_event , shift : shift ) end end
Creates n shift events.
Creates n shift events .
count
dates