Skip to content

Instantly share code, notes, and snippets.

@terrainoob
Created June 2, 2010 21:47
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save terrainoob/423049 to your computer and use it in GitHub Desktop.
Given /^I visit subdomain "(.+)"$/ do |sub|
#host! "#{sub}.example.com" #for webrat
Capybara.default_host = "#{sub}.example.com" #for Rack::Test
Capybara.app_host = "http://#{sub}.example.com:9887" if Capybara.current_driver == :culerity
################################################################################
# As far as I know, you have to put all the {sub}.example.com entries that you're
# using in your /etc/hosts file for the Culerity tests. This didn't seem to be
# required for Rack::Test
################################################################################
end
Scenario: This is a Rack::Test scenario
Given I visit subdomain "test"
And I log in as user "someone" with password "test" #another custom step
Yadda Yadda
@culerity
Scenario: This is a culerity scenario
Given I visit subdomain "test"
And I log in as user "someone" with password "test" #another custom step
Yadda Yadda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment