Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix File.bencode and File.bdecode tests #4

Merged
merged 1 commit into from

2 participants

@quaternion

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

@blatyo blatyo merged commit fbfa419 into blatyo:master
@blatyo
Owner

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

@blatyo
Owner

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

@quaternion

Good work, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2012
  1. Fix File.bencode and File.bdecode tests

    Andrew Nikolaev authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 7 deletions.
  1. +3 −7 spec/bencodr/io_spec.rb
View
10 spec/bencodr/io_spec.rb
@@ -12,7 +12,7 @@
describe ".bencode" do
it "should encode object to file" do
- File.bencode(file, object)
+ File.bencode(file.path, object)
file.rewind
file.read.should == "6:string"
end
@@ -35,10 +35,8 @@
end
describe ".bdecode" do
- subject{ File }
-
it "should decode object from file" do
- should bdecode(file).to(object)
+ File.bdecode(file.path).should == object
end
it "should decode sample file without error" do
@@ -47,10 +45,8 @@
end
describe "#bdecode" do
- subject{ file }
-
it "should decode object from file" do
- should bdecode_to(object)
+ file.bdecode.should == object
end
it "should decode sample file without error" do
Something went wrong with that request. Please try again.