Rake does recognize "rake examples_with_rcov"

Hi,

Q1 - Know why rake doesn’t recognize “rake examples_with_rcov” per
http://rspec.info/documentation/tools/rcov.html ?

Q2 - Also when I run “rake spec:rcov” it seems to give me the same as
if I just run “autotest” or “rake spec”. I was expecting a heap of
pointers to code I haven’t tested?

====================================================
Macintosh-2:myequity greg$ rake spec:rcov
(in /Users/greg/source/myequity)
DEPRECATION WARNING: You’re using the Ruby-based MySQL library that
ships with Rails. This library will be REMOVED FROM RAILS 2.2. Please
switch to the offical mysql gem: gem install mysql See
Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. for details. (called from
mysql_connection at
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/mysql_adapter.rb:81)
…P

Pending:
Frequency.beginning of period should be passed two or three parameters
(Not Yet Implemented)

Finished in 0.262688 seconds

9 examples, 0 failures, 1 pending

Macintosh-2:myequity greg$ rake -T | grep -i spec
rake gems:unpack # Unpacks the specified gem into
vendo…
rake gems:unpack:dependencies # Unpacks the specified gems and
its d…
rake spec # Run all specs in spec directory
(exc…
rake spec:clobber_rcov # Remove rcov products for rcov
rake spec:controllers # Run the specs under
spec/controllers
rake spec:db:fixtures:load # Load fixtures (from
spec/fixtures) i…
rake spec:doc # Print Specdoc for all specs
(excludi…
rake spec:helpers # Run the specs under spec/helpers
rake spec:lib # Run the specs under spec/lib
rake spec:models # Run the specs under spec/models
rake spec:plugin_doc # Print Specdoc for all plugin
specs
rake spec:plugins # Run the specs under
vendor/plugins (…
rake spec:plugins:rspec_on_rails # Runs the examples for
rspec_on_rails
rake spec:rcov # Run all specs in spec directory
with…
rake spec:server:restart # reload spec_server.
rake spec:server:start # start spec_server.
rake spec:server:stop # stop spec_server.
rake spec:translate # Translate/upgrade specs using the
bu…
rake spec:views # Run the specs under spec/views
Macintosh-2:myequity greg$

Macintosh-2:myequity greg$ ruby -v
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin9.3.0]
Macintosh-2:myequity greg$ rails -v
Rails 2.1.1
Macintosh-2:myequity greg$ gem -v
1.2.0

thanks

On 13 Sep 2008, at 12:39, Greg H. wrote:

Q1 - Know why rake doesn’t recognize “rake examples_with_rcov” per
http://rspec.info/documentation/tools/rcov.html ?

I think the point of that page is to show you how to write your own
rake tasks that use RSpec and RCov. You won’t get that rake task by
default in your own application but you could run it on the RSpec
source code by setting your current directory into the directory
where you’ve downloaded the RSpec gem or plugin.

Q2 - Also when I run “rake spec:rcov” it seems to give me the same as
if I just run “autotest” or “rake spec”. I was expecting a heap of
pointers to code I haven’t tested?

Try looking in the ‘coverage’ folder beneath the directory where you
ran the rake task. You should find all sorts of goodies in there.

cheers,
Matt

http://blog.mattwynne.net

In case you wondered: The opinions expressed in this email are my own
and do not necessarily reflect the views of any former, current or
future employers of mine.

re “ry looking in the ‘coverage’ folder” => Wow! Great stuff.

Is there a way to automatically launch a browser to the index page
after running “rake spec:rcov”

Tks

On Sat, Sep 13, 2008 at 4:47 PM, Greg H.
[email protected] wrote:

re “ry looking in the ‘coverage’ folder” => Wow! Great stuff.

Is there a way to automatically launch a browser to the index page
after running “rake spec:rcov”

rake spec:rcov && open coverage/index.html

:slight_smile:

Pat

thanks - oh dear, I’m seeing a lot of red in the rcov reports :slight_smile: