Post by dabs on Aug 26, 2019 15:06:12 GMT
I guess this question is just as much about the optimal process when adding a library to the project. What I'm trying to achieve is to add code coverage to my unit tests, just so I can see which areas of my application need test coverage, and which edge cases I'm not testing.
The library "simplecov" is one of many which seems to be recommended for this task:
github.com/colszowka/simplecov
I downloaded the .gem file from rubygems.org, unzipped it, and copied the lib folder to:
C:\RhoMobileSuite6.1.16\ruby\lib\ruby\gems\2.3.0\gems\rhodes-6.1.16\lib\framework
Then I followed the instructions for this library, i.e. added the following lines to the top of my spec_runner.rb file. This results a familiar error:
Error: undefined method `new' for #
Trace:
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rhoapplication.rb:217:in `require'
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rhoapplication.rb:217:in `serve'
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rho.rb:836:in `serve'
I assume that one reason for this would be that this library depends on other libraries which aren't installed, but it is really hard to tell, since the error message is not really helpful and there is not much to gain from the logfile either.
Any hints/tips regarding how I can solve this? I would be happy with any code coverage solution, i.e. this one in particular is not a requirement per se.
Regards,
DanĂel
The library "simplecov" is one of many which seems to be recommended for this task:
github.com/colszowka/simplecov
I downloaded the .gem file from rubygems.org, unzipped it, and copied the lib folder to:
C:\RhoMobileSuite6.1.16\ruby\lib\ruby\gems\2.3.0\gems\rhodes-6.1.16\lib\framework
Then I followed the instructions for this library, i.e. added the following lines to the top of my spec_runner.rb file. This results a familiar error:
Error: undefined method `new' for #
Trace:
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rhoapplication.rb:217:in `require'
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rhoapplication.rb:217:in `serve'
C:/RhoMobileSuite6.1.16/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1.16/lib/framework/rho/rho.rb:836:in `serve'
I assume that one reason for this would be that this library depends on other libraries which aren't installed, but it is really hard to tell, since the error message is not really helpful and there is not much to gain from the logfile either.
Any hints/tips regarding how I can solve this? I would be happy with any code coverage solution, i.e. this one in particular is not a requirement per se.
Regards,
DanĂel