spec/fixtures/models.rb in by_star-0.4.0 vs spec/fixtures/models.rb in by_star-0.5.0

- old
+ new

@@ -14,15 +14,20 @@ class Event < ActiveRecord::Base named_scope :private, :conditions => { :public => false } end class Invoice < ActiveRecord::Base + has_many :day_entries def self.factory(value, created_at = nil) create!(:value => value, :created_at => created_at, :number => value) end end +class DayEntry < ActiveRecord::Base + +end + ## seed data: year = Time.zone.now.year 1.upto(12) do |month| @@ -83,6 +88,8 @@ Event.create(:name => "Tomorrow", :start_time => Time.zone.now.tomorrow) # For by_weekend test Event.create(:name => "1st of August", :start_time => "01-08-#{Time.zone.now.year}".to_time) -Event.create(:name => "FBI meeting", :start_time => "02-03-#{Time.zone.now.year}".to_time, :public => false) +Event.create(:name => "FBI meeting", :start_time => "02-03-#{Time.zone.now.year}".to_time, :public => false) + +Invoice.first.day_entries.create(:spent_at => Time.zone.now + 1.hour, :name => "Working harder, better, faster stronger.") \ No newline at end of file