Sha256: cf2394ee291218df348a9d45460d086a7e9cb5475476b84a79720e36f85216b2
Contents?: true
Size: 583 Bytes
Versions: 2
Compression:
Stored size: 583 Bytes
Contents
require "test_helper" class ErrorTest < Test::Unit::TestCase context "Initialization" do setup do @code = rand(1e3) @message = random_string end 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 end should "accept error_code and error_message" do e = TextMagic::API::Error.new(@code, @message) e.code.should == @code e.message.should == @message end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
textmagic-0.5.0 | test/test_error.rb |
textmagic-0.4.0 | test/test_error.rb |