Created
January 23, 2023 18:49
-
-
Save ridiculous/aef35725a703e557862f19bc77843006 to your computer and use it in GitHub Desktop.
Rakefile for split up test suite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
Dontspreadit::Application.load_tasks | |
begin | |
require 'rspec/core/rake_task' | |
Rake::Task['default'].clear | |
RSpec::Core::RakeTask.new(:backend) do |config| | |
config.name = "Ruby backend" | |
config.rspec_opts = '-t ~js' | |
end | |
RSpec::Core::RakeTask.new(:mobile) do |config| | |
config.name = "Mobile version of the app" | |
config.rspec_opts = '-t mobile' | |
end | |
RSpec::Core::RakeTask.new(:desktop) do |config| | |
config.name = "Desktop version of the app" | |
config.rspec_opts = '-t desktop' | |
end | |
task browser: [:mobile, :desktop] | |
task default: [:backend, :browser] | |
rescue LoadError | |
puts 'Failed to load core rake tasks, defaulting to Rails default rake task' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment