[DRE-commits] [ruby-d3-rails] 01/02: Add DEP8 integration test

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Jan 18 13:37:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-d3-rails.

commit 208422c528ae17d1d61cbd148f47b9a69dca128e
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sun Jan 18 11:33:31 2015 -0200

    Add DEP8 integration test
---
 debian/control           |  2 +-
 debian/tests/control     |  2 ++
 debian/tests/control.ex  | 13 -------------
 debian/tests/integration | 37 +++++++++++++++++++++++++++++++++++++
 4 files changed, 40 insertions(+), 14 deletions(-)

diff --git a/debian/control b/debian/control
index 6d8535e..41d5084 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.9.6
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-d3-rails.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-d3-rails.git;a=summary
 Homepage: https://github.com/logical42/d3_rails
-Testsuite: autopkgtest-pkg-ruby
+Testsuite: autopkgtest
 XS-Ruby-Versions: all
 
 Package: ruby-d3-rails
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..5998656
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: integration
+Depends: @, rails
diff --git a/debian/tests/control.ex b/debian/tests/control.ex
deleted file mode 100644
index 429a392..0000000
--- a/debian/tests/control.ex
+++ /dev/null
@@ -1,13 +0,0 @@
-# AUTOGENERATED FILE
-#
-# As of autopkgtest 3.5, Ruby packages that use gem2deb are automatically
-# detected, and if debian/tests/control does not exist the contents below will
-# be assumed (with the exception of gem2deb being filtered out from
-# @builddeps@):
-
-Test-Command: gem2deb-test-runner --autopkgtest 2>&1
-Depends: @, @builddeps@, gem2deb-test-runner
-
-# if you would need to change something to the above, to that and rename this
-# file to `control`. Otherwise, you should probably delete this file
-# (recommended).
diff --git a/debian/tests/integration b/debian/tests/integration
new file mode 100644
index 0000000..c2a75ac
--- /dev/null
+++ b/debian/tests/integration
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+exec 2>&1
+
+set -ex
+
+cd $ADTTMP
+
+rails new sampleapp
+
+cd sampleapp
+
+tee --append Gemfile <<EOF
+gem "d3_rails"
+EOF
+
+bundle --local
+
+tee app/assets/javascripts/application.js <<EOF
+//= require d3
+EOF
+
+rails generate controller home index
+
+tee config/routes.rb <<EOF
+Rails.application.routes.draw do
+  root 'home#index'
+end
+EOF
+
+rails console <<EOF
+File.open('status.txt', 'w') do |f|
+  f.puts(app.get('/'))
+end
+EOF
+
+test "$(cat status.txt)" -eq 200

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-d3-rails.git



More information about the Pkg-ruby-extras-commits mailing list