spec/rspec/sidekiq/batch_spec.rb in rspec-sidekiq-1.1.0 vs spec/rspec/sidekiq/batch_spec.rb in rspec-sidekiq-2.0.0.beta

- old
+ new

@@ -1,25 +1,26 @@ -require "spec_helper" +# encoding: utf-8 +require 'spec_helper' -describe "Batch" do +describe 'Batch' do module Sidekiq module Batch class Status end end end - load File.expand_path(File.join(File.dirname(__FILE__), "../../../lib/rspec/sidekiq/batch.rb")) + load File.expand_path(File.join(File.dirname(__FILE__), '../../../lib/rspec/sidekiq/batch.rb')) - describe "NullStatus" do - describe "#total" do - it "returns 0 when no jobs" do + describe 'NullStatus' do + describe '#total' do + it 'returns 0 when no jobs' do null_status = Sidekiq::Batch.new.status expect(null_status.total).to eq(0) end - it "returns 1 when 1 job" do + it 'returns 1 when 1 job' do batch = Sidekiq::Batch.new batch.jobs do TestWorker.perform_async('5') end @@ -28,11 +29,11 @@ expect(null_status.total).to eq(1) end end - describe "#bid" do - it "returns a bid" do + describe '#bid' do + it 'returns a bid' do null_status = Sidekiq::Batch.new expect(null_status.bid).to_not be_nil end end end