auxesis / cucumber-nagios

Systems testing plugin for Nagios with Cucumber + Webrat + Mechanize + Net::SSH
http://cucumber-nagios.org/
MIT License
257 stars 43 forks source link

Make steps in webrat_steps.rb consistent #21

Closed maathieu closed 13 years ago

maathieu commented 14 years ago

Hi,

There's an extra space in the file upload regexp in webrat_steps.rb :

When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
--------------------------------------------^
  attach_file(field, path)
end

This may bork some test code.

Also, I think it would be nice to add an HTTP digest authentification mechanism like this:

Given /^I am logged in as "(.*)":"(.*)"$/ do |login, password|
        basic_auth(login, password)
end 

So that it is available in all test cases :).

Cheers,

mathieu

maathieu commented 14 years ago

Also, it would be nice to add quotes to the parameter of "Going to":

When /^I go to (.*)$/ do |path|
  visit path
end

So that it is consistent with the others.

auxesis commented 14 years ago

Thanks for picking this up. I'll have some time this weekend to apply these changes.

auxesis commented 13 years ago

Fixed and implemented in cucumber-nagos 0.8.0.