Heya, Need a help on Ruby tests. While I was packaging a ruby gem, I got a weird error. This is the structure of the test folder test ├── rack │ └── session │ └── redis_test.rb ├── redis │ └── rack │ └── version_test.rb └── test_helper.rb
The error message was as follows ========================= # Running: /home/balasankarc/packaging/redis-rack/ruby-redis-rack-1.5.0/test/redis/rack/version_test.rb:5: warning: toplevel constant Rack referenced by Redis::Rack F............... Finished in 4.033027s, 3.9672 runs/s, 11.4058 assertions/s. 1) Failure: 1::2#test_0001_returns current version [/home/balasankarc/packaging/redis-rack/ruby-redis-rack-1.5.0/test/redis/rack/version_test.rb:5]: Expected: "1.5.0" Actual: [1, 2] =========================== The content of the problematic file (/home/balasankarc/packaging/redis-rack/ruby-redis-rack-1.5.0/test/redis/rack/version_test.rb) is as follows =========================== require 'test_helper' describe Redis::Rack::VERSION do it 'returns current version' do Redis::Rack::VERSION.must_equal '1.5.0' end end =========================== It seems, in the describe statement, ruby is using the original gem "Rack" instead of the folder "Rack" defined inside the lib/redis folder. This error message happens in similar redis-* packages - by which redis support is provided to default gems like activesupport, actionpack etc. There also, ruby choose the correspoinding default gems (like activesupport, actionpack etc) instead of the folder inside lib/redis/ folder. Is there any way to solve this? -- Regards, Balasankar C http://balasankarc.in "Freedom is never easily won, but once established, freedom lasts, spreads and chokes out tyranny." - Trent Lott
signature.asc
Description: Digital signature