RSpec beta 22 with Rails 3

I am working on a Rails 3 application. Recently bundler got an update
for
rspec, which upgraded it to 22, (previously we were using beta 20).

After the update we are unable to run the old using ‘rake spec:rcov’,
while
running with ‘rake spec’ is running fine.
When you do rake spec it does not give any output and finishes the task.
something like below :

$ rake spec --trace
(in /work/rspec22)
** Invoke spec (first_time, not_needed)

$

Also, while making the sample app to send it out to the rspec users
mailing
list, I am not able to run spec:rcov task, can somebody guide if I have
forgotten any configuration for rcov.

Here is the link to sample app with reproducible behavior which I am
getting
while running ‘rake spec:rcov’ => http://github.com/anagri/rspecsample

Regards,
Amiruddin N.,
Bangalore, 560008, KA
India

Y! IM : [email protected]
GTalk : [email protected]

On Sep 21, 2010, at 4:08 AM, Amiruddin N. wrote:

I am working on a Rails 3 application. Recently bundler got an update for rspec, which upgraded it to 22, (previously we were using beta 20).

After the update we are unable to run the old using ‘rake spec:rcov’, while running with ‘rake spec’ is running fine.
When you do rake spec it does not give any output and finishes the task. something like below :

$ rake spec --trace
(in /work/rspec22)
** Invoke spec (first_time, not_needed)

$

This is a known issue
(http://github.com/rspec/rspec-core/issues#issue/152) and will be fixed
in the beta.23 release, later this week.

Cheers,
David

On Wed, Sep 22, 2010 at 12:54 AM, David C.
[email protected]wrote:

David,

I am facing two more issues with rspec+rcov

  • We are using Hudson as our CI environments. I am using rake plugin
    which allows to execute rake tasks on the CI server. When there are
    some
    spec failures in our app the ‘rake spec’ tasks returns proper exit
    code
    which Hudson identifies as a build failure, but when you run ‘rake
    spec:rcov’, even when the specs are failing, may be the exit code is
    such
    that Hudson is not able to identify the build has failed.
  • When I run rcov, it also analyses the files in the spec folder for
    coverage which is giving me wrong coverage statistics. I have tried
    setting
    the options to exclude specific folders through rcov.opts, but it
    doesn’t
    seem to work for a Rails 3 setup (RSpec 2). For my previous project
    on Rails
    2.3.8 (RSpec 1.3) it used to work fine and the spec folders were
    excluded
    while doing coverage calculations.

Cheers,
Amir

On Tue, Sep 21, 2010 at 10:46 PM, Amiruddin N. [email protected]
wrote:

while running with ‘rake spec’ is running fine.
(http://github.com/rspec/rspec-core/issues#issue/152) and will be fixed in
even when the specs are failing, may be the exit code is such that Hudson is
not able to identify the build has failed.
When I run rcov, it also analyses the files in the spec folder for coverage
which is giving me wrong coverage statistics. I have tried setting the
options to exclude specific folders through rcov.opts, but it doesn’t seem
to work for a Rails 3 setup (RSpec 2). For my previous project on Rails
2.3.8 (RSpec 1.3) it used to work fine and the spec folders were excluded
while doing coverage calculations.

Please file these as two separate issues at
http://github.com/rspec/rspec-core/issues

Thx,
David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs