-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi,
I have a bunch of testy tests for a project that I'm now migrating from Ruby 1.8.7 to Ruby 2.2. When I try and run the tests, I get an Argument error. Also, the samples don't work due to the same problem with Ruby 2.
Here's a dummy test:
ame-vm1$ cat test.rb
require 'rubygems'
require 'testy'
Testy.testing "test" do
# setup do
# puts "setup"
# end
test "check 1" do |result|
result.check "one",
:actual => 1,
:expect => 1
end
end
and here's the error:
ame-vm1$ ruby test.rb
---
test:
check 1:
failure:
error:
class: ArgumentError
message: wrong number of arguments (1 for 0)
backtrace:
- "/opt/devel/ext/testy/lib/testy.rb:70:in `block in initialize'"
- "/opt/devel/ext/testy/lib/testy.rb:132:in `instance_eval'"
- "/opt/devel/ext/testy/lib/testy.rb:132:in `block (4 levels) in run'"
- "/opt/devel/ext/testy/lib/testy.rb:132:in `each'"
- "/opt/devel/ext/testy/lib/testy.rb:132:in `ensure in block (3 levels) in
run'"
- "/opt/devel/ext/testy/lib/testy.rb:132:in `block (3 levels) in run'"
- "/opt/devel/ext/testy/lib/testy.rb:113:in `instance_eval'"
- "/opt/devel/ext/testy/lib/testy.rb:113:in `block (2 levels) in run'"
- "/home/XXX/.rvm/gems/ruby-2.2.0/gems/orderedhash-0.0.6/lib/orderedhash.rb:65:in
`block in each'"
- "/home/XXX/.rvm/gems/ruby-2.2.0/gems/orderedhash-0.0.6/lib/orderedhash.rb:65:in
`each'"
- "/home/XXX/.rvm/gems/ruby-2.2.0/gems/orderedhash-0.0.6/lib/orderedhash.rb:65:in
`each'"
- "/opt/devel/ext/testy/lib/testy.rb:108:in `block in run'"
- "/opt/devel/ext/testy/lib/testy.rb:78:in `call'"
- "/opt/devel/ext/testy/lib/testy.rb:78:in `context'"
- "/opt/devel/ext/testy/lib/testy.rb:102:in `run'"
- "/opt/devel/ext/testy/lib/testy.rb:167:in `testing'"
- test.rb:4:in `<main>'
expect: {}
actual: {}
Ruby:
ame-vm1$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
Any ideas? I didn't see anything obvious, but then I'm still trying to figure out exactly what's different between 1.8.7 and 2.2 as I migrate the code. The guides only get you so far, but a 8+ year old codebase is uncovering a few issues for sure.... ;)
Cheers,
ast
Metadata
Metadata
Assignees
Labels
No labels