summaryrefslogtreecommitdiff
path: root/spec/run.rb
blob: b1cc74fdcb177ca8d723123b65a1130e7255ea4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env ruby
require 'bundler'
require 'bundler/setup'

require 'chef_zero/server'
require 'rspec/core'

require 'pedant'
require 'pedant/opensource'

server = ChefZero::Server.new(port: 8889)
server.start_background

Pedant.config.suite = 'api'
Pedant.config[:config_file] = 'spec/support/pedant.rb'
Pedant.setup([
  '--skip-validation',
  '--skip-authentication',
  '--skip-authorization'
])

result = RSpec::Core::Runner.run(Pedant.config.rspec_args)

server.stop
exit(result)