diff options
author | gebele <gebele@in-silico.ch> | 2013-11-12 17:17:51 +0100 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2013-11-12 17:17:51 +0100 |
commit | 5351378fbb8cec66465903fc9071a8e9f99c7e3a (patch) | |
tree | 2da443fc203e5425ec4f44a6c4ff8dd0eb6389eb | |
parent | b7991c623776bdd995bb84638dd3e31fa23a0bff (diff) |
fixed assertion by regex instead equal
-rw-r--r-- | test/task.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/task.rb b/test/task.rb index 43262ed..71e48e9 100644 --- a/test/task.rb +++ b/test/task.rb @@ -187,7 +187,7 @@ class TaskTest < MiniTest::Test assert false,"there should have been an error" rescue => ex assert ex.is_a?(test[:error]),"error type should be a #{test[:error]}, but is a #{ex.class}" - assert ex.message==test[:msg],"message should be #{test[:msg]}, but is #{ex.message}" + assert ex.message=~/#{test[:msg]}/,"message should be #{test[:msg]}, but is #{ex.message}" assert ex.error_cause=~/test.rb:#{test[:line]}/,"code line number test.rb:#{test[:line]} is lost or wrong: #{ex.error_cause}" end end |