Sha256: cc24e10c172bd6b615f1cbce56cf2ca3803be5b8511fc9b51217967324f92f43

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

require 'helper_spec'
require 'generators/recon_job_generator'

describe "Recon Job Generator creates a Recon Job Driver Spec" do
	before(:all) do
    @rawdir = File.join($MRI_DATA, 'johnson.merit220.visit1', 'mrt00000', 'dicoms')
    @scans = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'fixtures', 'valid_scans.yaml'))
    
    @valid_recon_job_spec = {
      "step"=>"reconstruct",
      "scans"=> @scans
    }
  end
  
  it "should create a valid job spec" do
    recon_job_spec = ReconJobGenerator.new({'rawdir' => @rawdir}).build
    recon_job_spec.should == @valid_recon_job_spec
  end
  
  it "should raise an IOError if the raw dir isn't found." do
    lambda { ReconJobGenerator.new({'rawdir' => '/bad/path/to/raw/dir'}).build }.should raise_error IOError
  end
  
  it "should raise a DriverConfigError if the raw dir isn't specified." do
    lambda { ReconJobGenerator.new({}).build }.should raise_error DriverConfigError
  end
  
  after(:all) do
    # FileUtils.rm_r([@valid_workflow_spec['origdir'], @valid_workflow_spec['procdir'], @valid_workflow_spec['statsdir']])
  end
  
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rpipe-0.1.7 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.6 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.4 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.3 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.2 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.1 spec/generators/recon_job_generator_spec.rb
rpipe-0.1.0 spec/generators/recon_job_generator_spec.rb
rpipe-0.0.3 spec/generators/recon_job_generator_spec.rb
rpipe-0.0.2 spec/generators/recon_job_generator_spec.rb
rpipe-0.0.1 spec/generators/recon_job_generator_spec.rb