Skip to content

Commit

Permalink
Added Rake tasks for running specs and running specs under the hudson CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsofapollo committed Apr 27, 2011
1 parent 3675e82 commit 50f576d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ irb.rb
doc
.yardoc
test.rb
spec/reports
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gem 'savon_spec', :groups => [:test, :development]
gem 'rspec', "> 2.0", :groups => [:test, :development]
gem 'flexmock', :group => [:test, :development]
gem 'timecop', :groups => [:test, :development]
gem 'ci_reporter', :group => :test

group :development do
gem 'watchr'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ GEM
i18n (~> 0.5.0)
activesupport (3.0.6)
builder (2.1.2)
ci_reporter (1.6.4)
builder (>= 2.1.2)
crack (0.1.8)
diff-lcs (1.1.2)
flexmock (0.9.0)
Expand Down Expand Up @@ -47,6 +49,7 @@ DEPENDENCIES
activemodel
activesupport
builder
ci_reporter
flexmock
rspec (> 2.0)
ruby-fsevent
Expand Down
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'rake'
require 'rake/tasklib'
require 'rubygems'
require 'bundler'

Bundler.setup(:default, :test)


Dir["lib/tasks**/*.rake"].each do |file|
puts file
load(file)
end
24 changes: 24 additions & 0 deletions lib/tasks/test.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'

RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = './spec/**/*_spec.rb'
end

task :default => :spec
task :ci => ['hudson:spec']

namespace :hudson do
task :spec => ["ci:setup:rspec", 'rake:spec']

namespace :setup do

task :pre_ci do
require 'rubygems'
gem 'ci_reporter'
require 'ci/reporter/rake/rspec'
end

task :rspec => [:pre_ci, "ci:setup:rspec"]
end
end

0 comments on commit 50f576d

Please sign in to comment.