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')
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec) do |r|
|
||||
options = ['--tag ~type:integration']
|
||||
|
||||
def add_rspec_options(options)
|
||||
if RUBY_PLATFORM == 'java'
|
||||
options << '--tag ~platform:mri'
|
||||
else
|
||||
options << '--tag ~platform:java'
|
||||
end
|
||||
return options
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec) do |r|
|
||||
options = add_rspec_options(['--tag ~type:integration'])
|
||||
|
||||
r.rspec_opts = options.join(' ')
|
||||
end
|
||||
|
||||
namespace :spec do
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue