Sha256: f1cb4ee89349afa5acd0e84107a9e11ec7070a0bb3ffb28f1768de7fe29b5459
Contents?: true
Size: 952 Bytes
Versions: 2
Compression:
Stored size: 952 Bytes
Contents
require 'spec_helper' describe Quorum::Job do before(:each) do @job = Quorum::Job.new() ResqueSpec.reset! end it "fails validation without params (using error_on)" do @job.should have(1).error_on(:sequence) @job.should have(1).error_on(:algorithm) end it "passes validation with algorithm and valid sequence data" do @job.sequence = File.open( File.expand_path("../../data/nucl_prot_seqs.txt", __FILE__) ).read @job.build_blastn_job @job.blastn_job.queue = true @job.should have(0).errors_on(:sequence) @job.should have(0).errors_on(:algorithm) end it "queues workers after save" do @job.sequence = File.open( File.expand_path("../../data/nucl_prot_seqs.txt", __FILE__) ).read @job.build_blastn_job @job.blastn_job.queue = true @job.blastn_job.blast_dbs = ["test_1", "test_2"] @job.save! Workers::System.should have_queue_size_of(1) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
quorum-0.3.0 | spec/models/job_spec.rb |
quorum-0.2.1 | spec/models/job_spec.rb |