stonean

trying to be better than I was yesterday

Lockdown with Cucumber

I haven’t used Cucumber a lot with Lockdown, so if you have examples/tips please let me know and I’ll add them here.

To mimic the access denied portion of Lockdown you’ll need a step definition like so:


When /^I try to go to (.+)$/ do |page_name|
  begin
    visit path_to(page_name)
  rescue Exception
    visit Lockdown::System.fetch(:access_denied_path)
  end
end
Copyright © 2010 stonean. All rights reserved.
Powered by Thoth.