Sha256: be8c37b8771ed0edae979534d9ee36f936ea51f42d8a8ee03eacbdc195d6a60d

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

Given /^a diagnostic check named "([^"]*)" with the following statuses:$/ do |name, table|
  statuses = table.hashes[0]

  diagnostic_check name do |c|
    c.passed  { eval(statuses[:passed]) }
    c.warning { eval(statuses[:warning]) }
    c.failed  { eval(statuses[:failed]) }
  end
end

Given /^diagnostic check "([^"]*)" has the following data attributes:$/ do |name, table|
  data = diagnostic_check(name).data

  table.hashes[0].each do |k, v|
    data[k] = v
  end
end

Given /^diagnostic check "([^"]*)" has a data list: "([^"]*)"$/ do |name, list|
  diagnostic_check(name).data << list.split(',')
end

Then /^(?:|I )should see a (.+) diagnostic check named "([^"]*)"$/ do |status, name|
  with_scope(".diagnostic-check.#{status}") do
    page.should have_content(name)
  end
end

Then /^(?:|I )should see "([^"]*)" as the title$/ do |text|
  with_scope("#system-status") do
    page.should have_content(text)
  end
end

Then /^(?:|I )should see "([^"]*)" within diagnostic data$/ do |text|
  with_scope(".diagnostic-data") do
    page.should have_content(text)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
diagnostics-0.0.2 spec_rails/rails2/features/step_definitions/diagnostic_steps.rb