require 'rails_helper'

RSpec.feature "<%= class_name %> for <%= scenario.classify %>" do
  it_behaves_like "a workflow step" do
    let(:workflow_step){ workflow_instance.<%= file_name %> }
    let :attributes do
      {
      <%- attributes.each do |attribute| -%>
        <%- if attribute.boolean? -%>
        <%= attribute.name %>: { type: :boolean },
        <%- elsif attribute.name =~ /window_(from|to)/ -%>
        <%= attribute.name %>: { type: :<%= attribute.name %>},
        <%- else -%>
        <%= attribute.name %>: { type: :<%= attribute.type %>},
        <%- end -%>
      <%- end -%>
      }
    end
  end
end

