Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix File.bencode and File.bdecode tests #4

Merged
merged 1 commit into from about 2 years ago

2 participants

Andrew Nikolaev Allen Madsen
Andrew Nikolaev

Fix can't convert Tempfile into String error in tests for ruby 1.8.7.

Allen Madsen blatyo merged commit fbfa419 into from March 28, 2012
Allen Madsen blatyo closed this March 28, 2012
Allen Madsen
Owner

Thanks, I'll probably bang on the rest tonight.

Allen Madsen
Owner

New version is up. Sorry it took so long. Thanks for all the wonderful pull requests.

Andrew Nikolaev

Good work, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 27, 2012
Andrew Nikolaev Fix File.bencode and File.bdecode tests 523eddc
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 7 deletions. Show diff stats Hide diff stats

  1. 10  spec/bencodr/io_spec.rb
10  spec/bencodr/io_spec.rb
@@ -12,7 +12,7 @@
12 12
 
13 13
   describe ".bencode" do
14 14
     it "should encode object to file" do
15  
-      File.bencode(file, object)
  15
+      File.bencode(file.path, object)
16 16
       file.rewind
17 17
       file.read.should == "6:string"
18 18
     end
@@ -35,10 +35,8 @@
35 35
     end
36 36
 
37 37
     describe ".bdecode" do
38  
-      subject{ File }
39  
-
40 38
       it "should decode object from file" do
41  
-        should bdecode(file).to(object)
  39
+        File.bdecode(file.path).should == object
42 40
       end
43 41
 
44 42
       it "should decode sample file without error" do
@@ -47,10 +45,8 @@
47 45
     end
48 46
 
49 47
     describe "#bdecode" do
50  
-      subject{ file }
51  
-
52 48
       it "should decode object from file" do
53  
-        should bdecode_to(object)
  49
+        file.bdecode.should == object
54 50
       end
55 51
 
56 52
       it "should decode sample file without error" do
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.