@@ -434,21 +434,21 @@ def json(data)
434434 end
435435
436436 it "raises an error if timestamp is in milliseconds" do
437- lambda {
437+ expect {
438438 client . track ( 5 , "purchase" , { type : "socks" , price : "13.99" } , timestamp : 1561231234000 )
439- } . should raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
439+ } . to raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
440440 end
441441
442442 it "raises an error if timestamp is a date" do
443- lambda {
443+ expect {
444444 client . track ( 5 , "purchase" , { type : "socks" , price : "13.99" } , timestamp : Time . now )
445- } . should raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
445+ } . to raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
446446 end
447447
448448 it "raises an error if timestamp isn't an integer" do
449- lambda {
449+ expect {
450450 client . track ( 5 , "purchase" , { type : "socks" , price : "13.99" } , timestamp : "Hello world" )
451- } . should raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
451+ } . to raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
452452 end
453453
454454 it "sends an event id for deduplication when provided" do
@@ -819,12 +819,12 @@ def json(data)
819819 end
820820
821821 it "raises an error when timestamp is not a valid integer" do
822- lambda {
822+ expect {
823823 client . track_delivery_metric ( "delivered" , {
824824 :delivery_id => "abc123" ,
825825 :timestamp => "not-a-timestamp"
826826 } )
827- } . should raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
827+ } . to raise_error ( Customerio ::Client ::ParamError , /timestamp must be a valid integer/ )
828828 end
829829
830830 it "should raise if metric_name is invalid" do
0 commit comments