volanja / ansible_spec

It's ruby gem that connect Ansible & Serverspec for Test Driven Server Configuration(or TDD).
MIT License
229 stars 57 forks source link

Failures on Ruby 3.1 #150

Closed volanja closed 1 year ago

volanja commented 1 year ago
Failures:

  1) load_playbookの実行 異常系(playbookファイルの中身がない場合) exitする
     Failure/Error: expect{ AnsibleSpec.load_playbook(tmp_pb) }.to raise_error(SystemExit)

       expected SystemExit, got #<NoMethodError: undefined method `each' for nil:NilClass

           playbook.each do |site|
                   ^^^^^> with backtrace:
         # ./lib/ansible_spec/load_ansible.rb:254:in `load_playbook'
         # ./spec/load_ansible_spec.rb:920:in `block (4 levels) in <top (required)>'
         # ./spec/load_ansible_spec.rb:920:in `block (3 levels) in <top (required)>'
     # ./spec/load_ansible_spec.rb:920:in `block (3 levels) in <top (required)>'

Finished in 0.73125 seconds (files took 0.66282 seconds to load)
410 examples, 1 failure
volanja commented 1 year ago

https://github.com/volanja/ansible_spec/actions/runs/3772192941/jobs/6412987537

volanja commented 1 year ago

https://secret-garden.hatenablog.com/entry/2021/05/23/200803

volanja commented 1 year ago

Fixed at https://github.com/volanja/ansible_spec/pull/149