Removed also the in the meanwhile introduced rake task

This commit is contained in:
Tim Zallmann 2019-04-10 22:25:18 +02:00 committed by Stan Hu
parent c57529556c
commit fb8908d961

View file

@ -1,7 +1,7 @@
unless Rails.env.production? unless Rails.env.production?
namespace :karma do namespace :karma do
desc 'GitLab | Karma | Generate fixtures for JavaScript tests' desc 'GitLab | Karma | Generate fixtures for JavaScript tests'
task fixtures: ['karma:copy_emojis_from_public_folder', 'karma:rspec_fixtures'] task fixtures: ['karma:rspec_fixtures']
desc 'GitLab | Karma | Generate fixtures using RSpec' desc 'GitLab | Karma | Generate fixtures using RSpec'
RSpec::Core::RakeTask.new(:rspec_fixtures, [:pattern]) do |t, args| RSpec::Core::RakeTask.new(:rspec_fixtures, [:pattern]) do |t, args|
@ -11,14 +11,6 @@ unless Rails.env.production?
t.rspec_opts = '--format documentation' t.rspec_opts = '--format documentation'
end end
desc 'GitLab | Karma | Copy emojis file'
task :copy_emojis_from_public_folder do
# Copying the emojis.json from the public folder
fixture_file_name = Rails.root.join('spec/javascripts/fixtures/emojis/emojis.json')
FileUtils.mkdir_p(File.dirname(fixture_file_name))
FileUtils.cp(Rails.root.join('public/-/emojis/1/emojis.json'), fixture_file_name)
end
desc 'GitLab | Karma | Run JavaScript tests' desc 'GitLab | Karma | Run JavaScript tests'
task tests: ['yarn:check'] do task tests: ['yarn:check'] do
sh "yarn run karma" do |ok, res| sh "yarn run karma" do |ok, res|