spec/timber/events_spec.rb in timber-2.5.1 vs spec/timber/events_spec.rb in timber-2.6.0.pre.beta1

- old
+ new

@@ -16,10 +16,10 @@ PaymentRejectedEvent = Struct.new(:customer_id, :amount) do def to_timber_event Timber::Events::Custom.new( type: :payment_rejected, message: "Payment rejected for #{customer_id}", - data: respond_to?(:hash) ? hash : to_hash + data: respond_to?(:to_h) ? to_h : hash ) end end built_event = Timber::Events.build(PaymentRejectedEvent.new("abcd1234", 100)) expect(built_event).to be_kind_of(Timber::Events::Custom) \ No newline at end of file