mirror of https://github.com/reiseburo/hermann
Add support for spec:integration to ignore MRI and Java cases off their respective platforms
This commit is contained in:
parent
75efcc932e
commit
fea0656bc2
12
Rakefile
12
Rakefile
|
@ -11,21 +11,25 @@ Rake::ExtensionTask.new do |t|
|
||||||
t.gem_spec = Gem::Specification.load('hermann.gemspec')
|
t.gem_spec = Gem::Specification.load('hermann.gemspec')
|
||||||
end
|
end
|
||||||
|
|
||||||
RSpec::Core::RakeTask.new(:spec) do |r|
|
def add_rspec_options(options)
|
||||||
options = ['--tag ~type:integration']
|
|
||||||
|
|
||||||
if RUBY_PLATFORM == 'java'
|
if RUBY_PLATFORM == 'java'
|
||||||
options << '--tag ~platform:mri'
|
options << '--tag ~platform:mri'
|
||||||
else
|
else
|
||||||
options << '--tag ~platform:java'
|
options << '--tag ~platform:java'
|
||||||
end
|
end
|
||||||
|
return options
|
||||||
|
end
|
||||||
|
|
||||||
|
RSpec::Core::RakeTask.new(:spec) do |r|
|
||||||
|
options = add_rspec_options(['--tag ~type:integration'])
|
||||||
|
|
||||||
r.rspec_opts = options.join(' ')
|
r.rspec_opts = options.join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :spec do
|
namespace :spec do
|
||||||
RSpec::Core::RakeTask.new(:integration) do |r|
|
RSpec::Core::RakeTask.new(:integration) do |r|
|
||||||
r.rspec_opts = '--tag type:integration'
|
options = add_rspec_options(['--tag type:integration'])
|
||||||
|
r.rspec_opts = options.join(' ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue