spec/dashboard_spec.rb in split-0.7.3 vs spec/dashboard_spec.rb in split-0.8.0
- old
+ new
@@ -150,20 +150,20 @@
expect(experiment.winner.name).to eq('red')
end
it "should display the start date" do
experiment_start_time = Time.parse('2011-07-07')
- expect(Time).to receive(:now).and_return(experiment_start_time)
+ expect(Time).to receive(:now).at_least(:once).and_return(experiment_start_time)
experiment
get '/'
expect(last_response.body).to include('<small>2011-07-07</small>')
end
it "should handle experiments without a start date" do
experiment_start_time = Time.parse('2011-07-07')
- expect(Time).to receive(:now).and_return(experiment_start_time)
+ expect(Time).to receive(:now).at_least(:once).and_return(experiment_start_time)
Split.redis.hdel(:experiment_start_times, experiment.name)
get '/'