Sha256: d877d345aeeb203439ab9cbb3f83b6f729136c0f71db32012d765662cebee36a

Contents?: true

Size: 1.57 KB

Versions: 8

Compression:

Stored size: 1.57 KB

Contents

Given %(each of my applications has an environment) do
  known_accounts.each do |account|
    account.applications.each do |app|
      known_environments.push(
        create_environment(
          account: account,
          application: app,
          environment: {
            name: "#{app.name}_env"
          }
        )
      )
    end
  end
end

Given(/^I have the following environments:$/) do |environments|
  environments.hashes.each do |environment_hash|
    application = known_apps.find { |app| app.name == environment_hash['Application Name'] }
    known_environments.push(
      create_environment(
        account: application.account,
        application: application,
        environment: {
          name: environment_hash['Environment Name']
        }
      )
    )
  end
end

Then %(I see the name and ID for all of my environments) do
  known_environments.each do |environment|
    expect(output_text).to match(/#{Regexp.escape(environment.id.to_s)}\s+\|\s+#{Regexp.escape(environment.name)}/)
  end
end

Then %(I see the environments in the one account) do
  account_named('one').environments.all.each do |environment|
    expect(output_text).to match(/#{Regexp.escape(environment.id.to_s)}\s+\|\s+#{Regexp.escape(environment.name)}/)
  end
end

Then %(I do not see environments from other accounts) do
  two = account_named('two').environments.all.to_a
  three = account_named('three').environments.all.to_a

  (two + three).each do |environment|
    expect(output_text).not_to match(/#{Regexp.escape(environment.id.to_s)}\s+\|\s+#{Regexp.escape(environment.name)}/)
  end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ey-core-3.6.0.autoscaling1 features/step_definitions/environments_steps.rb
ey-core-3.6.4 features/step_definitions/environments_steps.rb
ey-core-3.6.3 features/step_definitions/environments_steps.rb
ey-core-3.6.1 features/step_definitions/environments_steps.rb
groove-ey-core-3.6.3 features/step_definitions/environments_steps.rb
groove-ey-core-3.6.2 features/step_definitions/environments_steps.rb
groove-ey-core-3.6.1 features/step_definitions/environments_steps.rb
ey-core-3.5.0 features/step_definitions/environments_steps.rb