spec/scaffolder/test/helpers_spec.rb in scaffolder-test-helpers-0.2.1 vs spec/scaffolder/test/helpers_spec.rb in scaffolder-test-helpers-0.2.2

- old
+ new

@@ -8,18 +8,18 @@ entries = [Sequence.new(:name => 'c1',:sequence => 'ATG')] @scaf_file, @seq_file = described_class.generate_scaffold_files(entries) end it "should create the corresponding scaffold file" do - File.exists?(@scaf_file).should be_true - scaffold = YAML.load(File.read(@scaf_file)) + File.exists?(@scaf_file.path).should be_true + scaffold = YAML.load(File.read(@scaf_file.path)) scaffold.should == [{'sequence' => {'source' => 'c1'}}] end it "should create the corresponding sequence file" do - File.exists?(@seq_file).should be_true - sequence = File.read(@seq_file) + File.exists?(@seq_file.path).should be_true + sequence = File.read(@seq_file.path) sequence.should == ">c1\nATG\n" end end @@ -30,19 +30,19 @@ Sequence.new(:name => 'c2',:sequence => 'ATG')] @scaf_file, @seq_file = described_class.generate_scaffold_files(entries) end it "should create the corresponding scaffold file" do - File.exists?(@scaf_file).should be_true - scaffold = YAML.load(File.read(@scaf_file)) + File.exists?(@scaf_file.path).should be_true + scaffold = YAML.load(File.read(@scaf_file.path)) scaffold.should == [{'sequence' => {'source' => 'c1'}}, {'sequence' => {'source' => 'c2'}}] end it "should create the corresponding sequence file" do - File.exists?(@seq_file).should be_true - sequence = File.read(@seq_file) + File.exists?(@seq_file.path).should be_true + sequence = File.read(@seq_file.path) sequence.should == ">c1\nATG\n>c2\nATG\n" end end @@ -53,18 +53,18 @@ Unresolved.new(:length => 5)] @scaf_file, @seq_file = generate_scaffold_files(entries) end it "should create the corresponding scaffold file" do - File.exists?(@scaf_file).should be_true - scaffold = YAML.load(File.read(@scaf_file)) + File.exists?(@scaf_file.path).should be_true + scaffold = YAML.load(File.read(@scaf_file.path)) scaffold.should == [{'sequence' => {'source' => 'c1'}}, {'unresolved' => {'length' => 5}}] end it "should create the corresponding sequence file" do - File.exists?(@seq_file).should be_true - sequence = File.read(@seq_file) + File.exists?(@seq_file.path).should be_true + sequence = File.read(@seq_file.path) sequence.should == ">c1\nATG\n" end end end