1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-23 07:09:39 +02:00
Maybe/test/support/securities_test_helper.rb

10 lines
236 B
Ruby
Raw Normal View History

module SecuritiesTestHelper
def create_security(ticker, prices:)
prices.each do |price|
Security::Price.create! ticker: ticker, date: price[:date], price: price[:price]
end
Security.create! ticker: ticker
end
end