summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-08-29 18:18:59 +0200
committerwinniehell <git@winniehell.de>2016-10-28 14:02:17 +0200
commit0f060bf4fccc3119dc4b7d6e296c2f0fc994bb4e (patch)
tree374a5157636eaa43b5f19e97937266d61ed3951f /lib/tasks
parent8afc2873304bd7de759fe3abf63a46f1541b4dc6 (diff)
downloadgitlab-ce-0f060bf4fccc3119dc4b7d6e296c2f0fc994bb4e.tar.gz
Replace static issue fixtures by script (!6059)
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/teaspoon.rake23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/tasks/teaspoon.rake b/lib/tasks/teaspoon.rake
new file mode 100644
index 00000000000..156fa90537d
--- /dev/null
+++ b/lib/tasks/teaspoon.rake
@@ -0,0 +1,23 @@
+Rake::Task['teaspoon'].clear if Rake::Task.task_defined?('teaspoon')
+
+namespace :teaspoon do
+ desc 'GitLab | Teaspoon | Generate fixtures for JavaScript tests'
+ RSpec::Core::RakeTask.new(:fixtures) do |t|
+ ENV['NO_KNAPSACK'] = 'true'
+ t.pattern = 'spec/javascripts/fixtures/*.rb'
+ t.rspec_opts = '--format documentation'
+ end
+
+ desc 'GitLab | Teaspoon | Run JavaScript tests'
+ task :tests do
+ require "teaspoon/console"
+ options = {}
+ abort('rake teaspoon:tests failed') if Teaspoon::Console.new(options).failures?
+ end
+end
+
+desc 'GitLab | Teaspoon | Shortcut for teaspoon:fixtures and teaspoon:tests'
+task :teaspoon do
+ Rake::Task['teaspoon:fixtures'].invoke
+ Rake::Task['teaspoon:tests'].invoke
+end