spec/features/integration_spec.rb in gush-3.0.0 vs spec/features/integration_spec.rb in gush-4.0.0
- old
+ new
@@ -134,11 +134,11 @@
end
end
class SummaryJob < Gush::Job
def perform
- output payloads.map { |payload| payload[:output] }
+ output(payloads.map { |payload| payload[:output] })
end
end
class PayloadWorkflow < Gush::Workflow
def configure
@@ -167,11 +167,11 @@
it "does not execute `configure` on each job for huge workflows" do
INTERNAL_SPY = double('spy')
INTERNAL_CONFIGURE_SPY = double('configure spy')
expect(INTERNAL_SPY).to receive(:some_method).exactly(110).times
- # One time when persisting, second time when reloading in the spec
- expect(INTERNAL_CONFIGURE_SPY).to receive(:some_method).exactly(2).times
+ # One time when persisting; reloading does not call configure again
+ expect(INTERNAL_CONFIGURE_SPY).to receive(:some_method).exactly(1).time
class SimpleJob < Gush::Job
def perform
INTERNAL_SPY.some_method
end