Commit 25eadf0c authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Proposal for split testing

parent 4881d493
Rake::Task["spec"].clear if Rake::Task.task_defined?('spec')
namespace :testing do
desc 'GITLAB | Run model specs'
task :models do
cmds = [
%W(rake gitlab:setup),
%W(rspec spec --tag @models)
]
run_commands(cmds)
end
desc 'GITLAB | Run feature specs'
task :features do
cmds = [
%W(rake gitlab:setup),
%W(rspec spec --tag @features)
]
run_commands(cmds)
end
desc "GITLAB | Run specs"
task :spec do
cmds = [
%W(rake gitlab:setup),
%W(rspec spec),
]
desc 'GITLAB | Run other specs'
task :other do
cmds = [
%W(rake gitlab:setup),
%W(rspec spec --tag ~@models --tag ~@features)
]
run_commands(cmds)
end
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless $?.exitstatus.zero?
def run_commands(cmds)
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless $?.exitstatus.zero?
end
end
end
require 'spec_helper'
describe "GitLab Flavored Markdown" do
describe "GitLab Flavored Markdown", features: true do
let(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:merge_request) { create(:merge_request, source_project: project, target_project: project) }
......
......@@ -19,7 +19,7 @@
require 'spec_helper'
describe AssemblaService do
describe AssemblaService, models: true do
describe "Associations" do
it { should belong_to :project }
it { should have_one :service_hook }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment