Skip to content

Commit

Permalink
Attempt 2 to Fix flakyness
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatas committed Dec 5, 2024
1 parent b1bc4a7 commit bdc47cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/timescaledb/acts_as_hypertable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

{
'last_month' => 1.month.ago.beginning_of_month,
'at_edge_of_window' => 1.month.ago.end_of_month.end_of_day,
'this_month' => 1.second.ago.beginning_of_month,
'this_week' => 1.second.ago.beginning_of_week,
'one_day_outside_window' => 2.days.ago.beginning_of_month,
'last_week' => 1.week.ago.beginning_of_week,
'one_day_outside_window' => 2.days.ago.beginning_of_month,
'at_edge_of_window' => 1.month.ago.end_of_month.end_of_day,
}.each do |identifier, created_at|
let!("event_#{identifier}") {
Event.create!(
Expand Down Expand Up @@ -128,7 +128,7 @@
context "when there are database records that were created this month" do
it "returns all the records that were created this month" do
this_month = Event.this_month.pluck(:identifier)
expect(this_month).to match_array(%w[at_edge_of_window one_day_outside_window this_month this_week])
expect(this_month).to include(*%w[this_month one_day_outside_window this_week])
end
end
end
Expand Down

0 comments on commit bdc47cc

Please sign in to comment.