RubyGems Navigation menu

lookout-rake 3.0.0

Lookout-Rake Lookout-Rake provides Rake tasks for testing using Lookout. § Installation Install Lookout-Rake with % gem install lookout § Usage Include the following code in your ‹Rakefile›: require 'lookout/rake-3.0' Lookout::Rake::Tasks::Test.new If the ‹:default› task hasn’t been defined it’ll be set to depend on the ‹:test› task. The ‹:check› task will also depend on the ‹:test› task. There’s also a ‹:test:coverage› task that gets defined that uses the coverage library that comes with Ruby 1.9 to check the test coverage when the tests are run. You can hook up your test task to use your Inventory¹: require 'library/version.rb' Lookout::Rake::Tasks::Test.new :inventory => Library::Version Also, if you use the tasks that come with Inventory, the test task will hook into the inventory you tell them to use automatically. To use Lookout together with Vim², place ‹contrib/rakelookout.vim› in ‹~/.vim/compiler› and add compiler rakelookout to ‹~/.vim/after/ftplugin/ruby.vim›. Executing ‹:make› from inside Vim will now run your tests and an errors and failures can be visited with ‹:cnext›. Execute ‹:help quickfix› for additional information. Another useful addition to your ‹~/.vim/after/ftplugin/ruby.vim› file may be nnoremap M :call run_test() let b:undo_ftplugin .= ' | nunmap M' function! s:run_test() let test = expand('%') let line = 'LINE=' . line('.') if test =~ '^lib/' let test = substitute(test, '^lib/', 'test/', '') let line = "" endif execute 'make' 'TEST=' . shellescape(test) line endfunction Now, pressing ‹M› will either run all tests for a given class, if the implementation file is active, or run the test at or just before the cursor, if the test file is active. This is useful if you’re currently receiving a lot of errors and/or failures and want to focus on those associated with a specific class or on a specific test. ¹ Get information on Inventory at http://disu.se/software/inventory/ ² Find out more about Vim at http://www.vim.org/

Gemfile:
=

install:
=

Versions:

  1. 3.1.0 September 04, 2013 (11 KB)
  2. 3.0.2 April 30, 2013 (11 KB)
  3. 3.0.1 May 04, 2012 (8.5 KB)
  4. 3.0.0 April 26, 2012 (8.5 KB)

Runtime Dependencies (2):

inventory ~> 1.2
rake ~> 0.9.2

Development Dependencies (1):

Owners:

Authors:

  • Nikolai Weibull

SHA 256 checksum:

=

Total downloads 15,154

For this version 3,633

Version Released:

Licenses:

N/A

Required Ruby Version: None

Links: