spec/cli/cli_spec.rb in bioinform-0.1.7 vs spec/cli/cli_spec.rb in bioinform-0.1.8

- old
+ new

@@ -1,13 +1,14 @@ -require 'spec_helper' -require 'bioinform/cli' +require_relative '../spec_helper' +require_relative '../../lib/bioinform/cli' describe Bioinform::CLI do - describe '::output_filename' do + describe '.change_folder_and_extension' do it 'should change extension and folder' do - Bioinform::CLI.output_filename('test.pcm', 'pwm', '.').should == './test.pwm' - Bioinform::CLI.output_filename('test.pcm', 'pat', 'pwm_folder').should == 'pwm_folder/test.pat' - Bioinform::CLI.output_filename('pcm/test.pcm', 'pat', 'pwm_folder').should == 'pwm_folder/test.pat' - Bioinform::CLI.output_filename('test.pcm', 'pat', '../pwm_folder').should == '../pwm_folder/test.pat' + extend Bioinform::CLI::Helpers + change_folder_and_extension('test.pcm', 'pwm', '.').should == './test.pwm' + change_folder_and_extension('test.pcm', 'pat', 'pwm_folder').should == 'pwm_folder/test.pat' + change_folder_and_extension('pcm/test.pcm', 'pat', 'pwm_folder').should == 'pwm_folder/test.pat' + change_folder_and_extension('test.pcm', 'pat', '../pwm_folder').should == '../pwm_folder/test.pat' end end end \ No newline at end of file