Sha256: 0deebd4082951a64fbbcdb35cf7b16ddc6d0a70545f517659f0b667e665723d6
Contents?: true
Size: 664 Bytes
Versions: 12
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true module Awspec::Generator module Spec class CloudwatchEvent include Awspec::Helper::Finder def generate_all events = select_all_cloudwatch_events raise 'Not Found event' if events.empty? ERB.new(event_spec_template, nil, '-').result(binding).chomp end def event_spec_template <<-'EOF' <% events.each do |event| %> describe cloudwatch_event('<%= event.name %>') do it { should exist } <%- if event.state == 'ENABLED' -%> it { should be_enable } <% end -%> it { should be_scheduled('<%= event.schedule_expression %>') } end <% end %> EOF end end end end
Version data entries
12 entries across 12 versions & 1 rubygems