summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-05-20 11:47:38 +0200
committerAzul <azul@riseup.net>2016-05-20 16:35:55 +0200
commitf20ecdfb249128ba79da069407dce32f6f7e2fca (patch)
treec38f373f27d972e554dae16c77ccd0d6a9fdc833
parente542a3056c27fd662ef767b6720861035f6dbb1c (diff)
include engine tests in default test
-rw-r--r--engines/support/test/integration/create_ticket_test.rb2
-rw-r--r--lib/tasks/test.rake15
-rw-r--r--test/integration/navigation_test.rb9
3 files changed, 11 insertions, 15 deletions
diff --git a/engines/support/test/integration/create_ticket_test.rb b/engines/support/test/integration/create_ticket_test.rb
index 00f9a6b..6abb3d3 100644
--- a/engines/support/test/integration/create_ticket_test.rb
+++ b/engines/support/test/integration/create_ticket_test.rb
@@ -29,7 +29,7 @@ class CreateTicketTest < BrowserIntegrationTest
fill_in 'Description', with: 'description of the problem goes here'
click_on 'Submit Ticket'
assert page.has_content?("is invalid")
- assert_equal 'invalid data', find_field('Email').value
+ assert_equal 'invaliddata', find_field('Email').value
assert_equal 'some user', find_field('Regarding User').value
end
diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake
index d96b625..9859729 100644
--- a/lib/tasks/test.rake
+++ b/lib/tasks/test.rake
@@ -1,10 +1,15 @@
namespace :test do
- [:units, :functionals, :integration].each do |type|
- Rails::SubTestTask.new(type => "test:prepare") do |t|
- t.libs << "test"
- subdir = type.to_s.singularize
- t.pattern = "engines/*/test/#{subdir}/**/*_test.rb"
+ namespace :engines do
+ [:units, :functionals, :integration].each do |type|
+ desc "Test engine #{type}"
+ Rails::TestTask.new(type => "test:prepare") do |t|
+ t.libs << "test"
+ subdir = type.to_s.singularize
+ t.pattern = "engines/*/test/#{subdir}/**/*_test.rb"
+ end
+ Rake::Task["test:#{type}"].enhance ["test:engines:#{type}"]
+ Rake::Task["test"].enhance ["test:engines:#{type}"]
end
end
diff --git a/test/integration/navigation_test.rb b/test/integration/navigation_test.rb
deleted file mode 100644
index eec8c0e..0000000
--- a/test/integration/navigation_test.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'test_helper'
-
-class NavigationTest < ActionDispatch::IntegrationTest
-
- # test "the truth" do
- # assert true
- # end
-end
-