Class: Taglob::Rake::SpecTagsTask

Inherits:
TagsTask
  • Object
show all
Defined in:
lib/taglob/rake/test_tags_task.rb

Overview

SpecTagsTask : To run rake tasks on Rspec test framework

require 'taglob/rake/tasks' in your Rakefile to get spec_tag.

Example :

* $ rake spec_tag tags="for,the,win"  #Contain all of these tags (AND condition)
* $ rake spec_tag tags="foo|bar"      #Contain any of these tags (OR condition)

Instance Attribute Summary

Attributes inherited from TagsTask

#pattern, #tags

Instance Method Summary collapse

Methods inherited from TagsTask

#test_files

Constructor Details

#initialize(name = :spec_tags) ⇒ SpecTagsTask

Returns a new instance of SpecTagsTask.



65
66
67
# File 'lib/taglob/rake/test_tags_task.rb', line 65

def initialize(name = :spec_tags)
  super(name)
end

Instance Method Details

#defineObject



69
70
71
72
73
# File 'lib/taglob/rake/test_tags_task.rb', line 69

def define
  ::Spec::Rake::SpecTask.new @name do |t|
    t.spec_files = test_files
  end
end