You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/08/08 14:54:35 UTC
[PATCH core 2/6] Client: Removed unused rake tasks and added test task
From: Michal Fojtik <mf...@redhat.com>
* Fixtures generators are not needed
* Removed task for deltacloudc
* Added minitest task
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
client/Rakefile | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/client/Rakefile b/client/Rakefile
index c5a9f70..9ced4ad 100644
--- a/client/Rakefile
+++ b/client/Rakefile
@@ -26,7 +26,6 @@ task 'documentation' do
load 'lib/documentation.rb'
end
-
spec = Gem::Specification.load('deltacloud-client.gemspec')
Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
@@ -56,26 +55,8 @@ task :reinstall do
puts %x{gem install deltacloud-client-*.gem --local}
end
-desc "Setup Fixtures"
-task 'fixtures' do
- FileUtils.rm_rf( File.dirname( __FILE__ ) + '/specs/data' )
- FileUtils.cp_r( File.dirname( __FILE__ ) + '/specs/fixtures', File.dirname( __FILE__ ) + '/specs/data' )
-end
-
-namespace :test do
- Rake::TestTask.new(:cmd) do |t|
- t.libs << "tests"
- t.test_files = FileList['tests/cmd.rb']
- t.verbose = true
- end
-end
-
-desc "Clean Fixtures"
-task 'fixtures:clean' do
- FileUtils.rm_rf( File.dirname( __FILE__ ) + '/specs/data' )
-end
-
-begin
- require 'ci/reporter/rake/rspec'
-rescue LoadError
+Rake::TestTask.new(:test) do |t|
+ t.test_files = FileList[
+ 'tests/*test.rb', # EC2 frontend internal API tests
+ ]
end
--
1.7.10.2
Re: [PATCH core 2/6] Client: Removed unused rake tasks and added
test task
Posted by David Lutterkort <lu...@redhat.com>.
On Wed, 2012-08-08 at 14:54 +0200, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mf...@redhat.com>
>
> * Fixtures generators are not needed
> * Removed task for deltacloudc
> * Added minitest task
>
> Signed-off-by: Michal fojtik <mf...@redhat.com>
You should also remove the rspec stuff:
diff --git a/client/Rakefile b/client/Rakefile
index 9ced4ad..255f735 100644
--- a/client/Rakefile
+++ b/client/Rakefile
@@ -31,23 +31,6 @@ Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
-def available?(name)
- Gem::Specification.find_by_name(name)
-rescue Gem::LoadError
- false
-rescue
- Gem.available?(name)
-end
-
-if available?('rspec')
- require 'rspec/core/rake_task'
- desc "Run all examples"
- RSpec::Core::RakeTask.new('spec') do |t|
- t.pattern = FileList['specs/**/*_spec.rb']
- t.rspec_opts = [ "--format", "nested", "--color"]
- end
-end
-
desc "Reinstall gem"
task :reinstall do
puts %x{gem uninstall deltacloud-client --all -I -x}