scaffolder-test-helpers 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/scaffolder/test/helpers.rb +4 -4
- data/scaffolder-test-helpers.gemspec +2 -2
- data/spec/scaffolder/test/helpers_spec.rb +12 -12
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -12,15 +12,15 @@ module Scaffolder::Test
|
|
12
12
|
[write_scaffold_file(entries),write_sequence_file(entries)]
|
13
13
|
end
|
14
14
|
|
15
|
-
def write_scaffold_file(entries,file = Tempfile.new("scaffold")
|
16
|
-
File.open(file,'w') do |tmp|
|
15
|
+
def write_scaffold_file(entries,file = Tempfile.new("scaffold"))
|
16
|
+
File.open(file.path,'w') do |tmp|
|
17
17
|
tmp.print(YAML.dump(entries.map{|e| e.to_hash }))
|
18
18
|
end
|
19
19
|
file
|
20
20
|
end
|
21
21
|
|
22
|
-
def write_sequence_file(entries,file = Tempfile.new("sequence")
|
23
|
-
File.open(file,'w') do |tmp|
|
22
|
+
def write_sequence_file(entries,file = Tempfile.new("sequence"))
|
23
|
+
File.open(file.path,'w') do |tmp|
|
24
24
|
entries.each do |entry|
|
25
25
|
tmp.puts(entry.to_fasta) if entry.respond_to? :to_fasta
|
26
26
|
end
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{scaffolder-test-helpers}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Barton"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-05}
|
13
13
|
s.description = %q{Useful Helper methods and classes for testing scaffolder.}
|
14
14
|
s.email = %q{mail@michaelbarton.me.uk}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -10,14 +10,14 @@ describe Scaffolder::Test::Helpers, "#generate_scaffold_files method" do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
it "should create the corresponding scaffold file" do
|
13
|
-
File.exists?(@scaf_file).should be_true
|
14
|
-
scaffold = YAML.load(File.read(@scaf_file))
|
13
|
+
File.exists?(@scaf_file.path).should be_true
|
14
|
+
scaffold = YAML.load(File.read(@scaf_file.path))
|
15
15
|
scaffold.should == [{'sequence' => {'source' => 'c1'}}]
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should create the corresponding sequence file" do
|
19
|
-
File.exists?(@seq_file).should be_true
|
20
|
-
sequence = File.read(@seq_file)
|
19
|
+
File.exists?(@seq_file.path).should be_true
|
20
|
+
sequence = File.read(@seq_file.path)
|
21
21
|
sequence.should == ">c1\nATG\n"
|
22
22
|
end
|
23
23
|
|
@@ -32,15 +32,15 @@ describe Scaffolder::Test::Helpers, "#generate_scaffold_files method" do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should create the corresponding scaffold file" do
|
35
|
-
File.exists?(@scaf_file).should be_true
|
36
|
-
scaffold = YAML.load(File.read(@scaf_file))
|
35
|
+
File.exists?(@scaf_file.path).should be_true
|
36
|
+
scaffold = YAML.load(File.read(@scaf_file.path))
|
37
37
|
scaffold.should == [{'sequence' => {'source' => 'c1'}},
|
38
38
|
{'sequence' => {'source' => 'c2'}}]
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should create the corresponding sequence file" do
|
42
|
-
File.exists?(@seq_file).should be_true
|
43
|
-
sequence = File.read(@seq_file)
|
42
|
+
File.exists?(@seq_file.path).should be_true
|
43
|
+
sequence = File.read(@seq_file.path)
|
44
44
|
sequence.should == ">c1\nATG\n>c2\nATG\n"
|
45
45
|
end
|
46
46
|
|
@@ -55,15 +55,15 @@ describe Scaffolder::Test::Helpers, "#generate_scaffold_files method" do
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it "should create the corresponding scaffold file" do
|
58
|
-
File.exists?(@scaf_file).should be_true
|
59
|
-
scaffold = YAML.load(File.read(@scaf_file))
|
58
|
+
File.exists?(@scaf_file.path).should be_true
|
59
|
+
scaffold = YAML.load(File.read(@scaf_file.path))
|
60
60
|
scaffold.should == [{'sequence' => {'source' => 'c1'}},
|
61
61
|
{'unresolved' => {'length' => 5}}]
|
62
62
|
end
|
63
63
|
|
64
64
|
it "should create the corresponding sequence file" do
|
65
|
-
File.exists?(@seq_file).should be_true
|
66
|
-
sequence = File.read(@seq_file)
|
65
|
+
File.exists?(@seq_file.path).should be_true
|
66
|
+
sequence = File.read(@seq_file.path)
|
67
67
|
sequence.should == ">c1\nATG\n"
|
68
68
|
end
|
69
69
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffolder-test-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Barton
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-05 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|