Sha256: 0a42afd24b27c80067d515c28495b51ccebd7d95b480194eca5744693e62efc7
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 KB
Contents
require 'rubygems' require 'spec/spec_helper' require 'taglob/rake' describe "Test/Spec Tags Task" do before :all do @file_name ="./lib/taglob/rake/test_task.rb" @rake = Rake::Application.new Rake.application = @rake end after :all do Rake.application = nil end it "should create a rake task to run test unit tests marked with tags" do task = Taglob::Rake::TestTagsTask.new :test_unit @rake.task_names_include?("test_unit").should be_true end it "should create a rake task to run spec tests marked with tags" do task = Taglob::Rake::SpecTagsTask.new :spec_tests @rake.task_names_include?("spec_tests").should be_true end it "should be able to run tags grouped as a OR" do task = Taglob::Rake::TestTagsTask.new :or_test do |t| t.pattern = 'spec/tagged_files/*.rb' t.tags = "bar|lulz" end tagged_files = task.test_files tagged_files.should_not include('spec/tagged_files/foo.rb') tagged_files.should include('spec/tagged_files/foo_bar_buttz.rb') tagged_files.should include('spec/tagged_files/epic_lulz.rb') end it "should be able to run tags grouped as a AND" do task = Taglob::Rake::TestTagsTask.new :and_test do |t| t.pattern = 'spec/tagged_files/*.rb' t.tags = "foo,bar" end tagged_files = task.test_files tagged_files.should_not include('spec/tagged_files/foo.rb') tagged_files.should include('spec/tagged_files/foo_bar_buttz.rb') tagged_files.should_not include('spec/tagged_files/epic_lulz.rb') end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
scudco-taglob-1.0.0 | spec/test_tags_task_spec.rb |
scudco-taglob-1.0.1 | spec/test_tags_task_spec.rb |
taglob-1.0.0 | spec/test_tags_task_spec.rb |