test/test_error.rb in textmagic-0.5.0 vs test/test_error.rb in textmagic-0.6.0
- old
+ new
@@ -1,24 +1,24 @@
require "test_helper"
-class ErrorTest < Test::Unit::TestCase
+describe "Error" do
- context "Initialization" do
+ describe "Initialization" do
- setup do
+ before do
@code = rand(1e3)
@message = random_string
end
- should "accept a hash with error_code and error_message" do
+ it "should accept a hash with error_code and error_message" do
e = TextMagic::API::Error.new("error_code" => @code, "error_message" => @message)
- e.code.should == @code
- e.message.should == @message
+ assert_equal @code, e.code
+ assert_equal @message, e.message
end
- should "accept error_code and error_message" do
+ it "should accept error_code and error_message" do
e = TextMagic::API::Error.new(@code, @message)
- e.code.should == @code
- e.message.should == @message
+ assert_equal @code, e.code
+ assert_equal @message, e.message
end
end
end