Sha256: 903de530a74abffbf6d9b44ddea32df4b808d88d104dba0d570ca7d4220db88e

Contents?: true

Size: 533 Bytes

Versions: 22

Compression:

Stored size: 533 Bytes

Contents

require 'rails_helper'

module Kuroko2::Workflow::Task
  describe Queue do
    describe '#execute' do
      around do |example|
        Timecop.freeze(Time.at(time)) do
          example.run
        end
      end
      before { Sleep.new(node, token).execute }

      let(:token) { build(:token, script: 'sleep:') }
      let(:node) { Kuroko2::Workflow::Node.new(:sleep, seconds.to_s) }

      let(:seconds) { 10 }
      let(:time) { 1000000000 }

      it { expect(token.context['SLEEP']).to eq (time + seconds) }
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
kuroko2-0.8.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.7.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.6.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.5.2 spec/workflow/task/sleep_spec.rb
kuroko2-0.5.1 spec/workflow/task/sleep_spec.rb
kuroko2-0.5.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.6 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.5 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.4 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.3 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.2 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.1 spec/workflow/task/sleep_spec.rb
kuroko2-0.4.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.3.4 spec/workflow/task/sleep_spec.rb
kuroko2-0.3.3 spec/workflow/task/sleep_spec.rb
kuroko2-0.3.2 spec/workflow/task/sleep_spec.rb
kuroko2-0.3.1 spec/workflow/task/sleep_spec.rb
kuroko2-0.3.0 spec/workflow/task/sleep_spec.rb
kuroko2-0.2.3 spec/workflow/task/sleep_spec.rb
kuroko2-0.2.2 spec/workflow/task/sleep_spec.rb