test/decoding_test.rb in bencode-0.8.0 vs test/decoding_test.rb in bencode-0.8.1
- old
+ new
@@ -1,19 +1,17 @@
require 'environment'
-class DecodingTest < MiniTest::Unit::TestCase
- context "The BEncode decoder" do
- should_decode 42, "i42e"
- should_decode 0, "i0e"
- should_decode -42, "i-42e"
+describe "decoding" do
+ it_should_decode 42, "i42e"
+ it_should_decode 0, "i0e"
+ it_should_decode -42, "i-42e"
- should_decode "foo", "3:foo"
- should_decode "", "0:"
+ it_should_decode "foo", "3:foo"
+ it_should_decode "", "0:"
- should_decode [1, 2, 3], "li1ei2ei3ee"
-
- hsh = {"foo" => "bar", "baz" => "qux"}
- should_decode hsh, "d3:foo3:bar3:baz3:quxe"
-
- should_decode 42, "i42eBOGUS", :ignore_trailing_junk => true
- end
+ it_should_decode [1, 2, 3], "li1ei2ei3ee"
+
+ hsh = {"foo" => "bar", "baz" => "qux"}
+ it_should_decode hsh, "d3:foo3:bar3:baz3:quxe"
+
+ it_should_decode 42, "i42eBOGUS", :ignore_trailing_junk => true
end