[DRE-commits] [ruby-cucumber-rails] 07/08: added DEP-8 tests
Antonio Terceiro
terceiro at moszumanska.debian.org
Thu Oct 29 20:06:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-cucumber-rails.
commit c61c1d6bd3786aca17b1200ed05ada1b3a66e687
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Thu Oct 29 17:50:01 2015 -0200
added DEP-8 tests
---
debian/control | 2 +-
debian/tests/control | 6 ++++++
debian/tests/smoke-test | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/debian/control b/debian/control
index cdfdc26..f89f778 100644
--- a/debian/control
+++ b/debian/control
@@ -20,7 +20,7 @@ Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-cucumber-rails.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-cucumber-rails.git
Homepage: http://cukes.info
-Testsuite: autopkgtest-pkg-ruby
+Testsuite: autopkgtest
XS-Ruby-Versions: all
Package: ruby-cucumber-rails
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..57f7823
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,6 @@
+Test-Command: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
+Depends: @, rake, ruby-rspec, gem2deb-test-runner
+
+Tests: smoke-test
+Depends: @, rails
+Restrictions: needs-recommends
diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
new file mode 100755
index 0000000..c18b696
--- /dev/null
+++ b/debian/tests/smoke-test
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+if [ -z "$ADTTMP" ]; then
+ ADTTMP=$(mktemp -d)
+ cleanup() {
+ rm -rf "$ADTTMP"
+ }
+ trap cleanup INT TERM EXIT
+fi
+
+cd $ADTTMP
+
+exec 2>&1
+set -ex
+
+rails new myapp
+cd myapp
+
+rails generate cucumber:install
+
+tee features/test.feature <<FEATURE
+Feature: test
+ Scenario: test
+ When I go to /
+ Then I should see "Hello, world"
+FEATURE
+
+tee features/step_definitions/test_steps.rb <<STEPS
+When(/^I go to \/$/) do
+ visit '/'
+end
+
+Then(/^I should see "([^"]*)"$/) do |arg1|
+ expect(page.body).to match(arg1)
+end
+STEPS
+
+rails generate controller home
+
+tee config/routes.rb <<ROUTES
+Rails.application.routes.draw do
+ root 'home#index'
+end
+ROUTES
+
+tee app/views/home/index.html.erb <<HOMEPAGE
+Hello, world
+HOMEPAGE
+
+rake
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-cucumber-rails.git
More information about the Pkg-ruby-extras-commits
mailing list