- Time.expects(:new).with().returns(test_time).once
- }
- it { is_expected.to run.with_params().and_return(1160727311) }
- it { is_expected.to run.with_params('').and_return(1160727311) }
- it { is_expected.to run.with_params([]).and_return(1160727311) }
- it { is_expected.to run.with_params({}).and_return(1160727311) }
- it { is_expected.to run.with_params('foo').and_return(1160727311) }
- it { is_expected.to run.with_params('UTC').and_return(1160727311) }
- it { is_expected.to run.with_params('America/New_York').and_return(1160727311) }
+ allow(Time).to receive(:new).with(no_args).and_return(test_time).once
+ end
+ it { is_expected.to run.with_params.and_return(1_160_727_311) }
+ it { is_expected.to run.with_params('').and_return(1_160_727_311) }
+ it { is_expected.to run.with_params([]).and_return(1_160_727_311) }
+ it { is_expected.to run.with_params({}).and_return(1_160_727_311) }
+ it { is_expected.to run.with_params('foo').and_return(1_160_727_311) }
+ it { is_expected.to run.with_params('UTC').and_return(1_160_727_311) }
+ it { is_expected.to run.with_params('America/New_York').and_return(1_160_727_311) }