Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make cucumber specs run on machines that know their hostname.

  • Loading branch information...
commit 9e9443a999506502557096c5d756b5291fc2aacf 1 parent a68e268
Graham Hughes authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 features/step_definitions/logs.rb
View
6 features/step_definitions/logs.rb
@@ -22,11 +22,11 @@
#++
Then /^the logs should show a \"([^\"]*)\" user agent$/ do |ua|
- File.open("#{@tmpdir}/weblog.out").read.should =~ /\Alocalhost - - \[[^\]]*\] \"GET [^ ]+ HTTP\/1\.1\" \d+ \d+ \"-\" \"#{Regexp.escape(ua)}\"\n\Z/
+ File.open("#{@tmpdir}/weblog.out").read.should =~ /\A\w+ - - \[[^\]]*\] \"GET [^ ]+ HTTP\/1\.1\" \d+ \d+ \"-\" \"#{Regexp.escape(ua)}\"\n\Z/
end
Then /^the proxy should have been used$/ do
- File.open("#{@tmpdir}/proxy.out").read.should =~ /\Alocalhost - [^ ]+ \[[^\]]*\] \"GET #{Regexp.escape(@uri.to_s)} HTTP\/1\.1\" \d+ \d+ \"-\" \".*\"\n\Z/
+ File.open("#{@tmpdir}/proxy.out").read.should =~ /\A\w+ - [^ ]+ \[[^\]]*\] \"GET #{Regexp.escape(@uri.to_s)} HTTP\/1\.1\" \d+ \d+ \"-\" \".*\"\n\Z/
end
Then /^the proxy should have been tunneled through$/ do
@@ -34,5 +34,5 @@
end
Then /^the proxy should have been tunneled through with a (\d+) status code$/ do |code|
- File.open("#{@tmpdir}/proxy.out").read.should =~ /^localhost - [^ ]+ \[[^\]]*\] \"CONNECT #{Regexp.escape(@uri.host)}:#{Regexp.escape(@uri.port.to_s)} HTTP\/1\.1\" #{Regexp.escape(code)} \d+ \"-\" \".*\"\n$/
+ File.open("#{@tmpdir}/proxy.out").read.should =~ /^\w+ - [^ ]+ \[[^\]]*\] \"CONNECT #{Regexp.escape(@uri.host)}:#{Regexp.escape(@uri.port.to_s)} HTTP\/1\.1\" #{Regexp.escape(code)} \d+ \"-\" \".*\"\n$/
end
Please sign in to comment.
Something went wrong with that request. Please try again.