Created
March 23, 2011 23:59
-
-
Save cherring/884299 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Before do | |
| Capybara.default_host = 'example.com' | |
| DatabaseCleaner.start | |
| end | |
| After do | |
| DatabaseCleaner.clean | |
| FileUtils.rm_r(Dir.glob("#{Rails.root}/tmp/uploads/*")) | |
| FileUtils.rm_r(Dir.glob("#{Rails.root}/uploads/test*")) | |
| FileUtils.rm_r(Dir.glob("#{Rails.root}/public/uploads/tmp/*")) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Given /^I visit the subdomain for my account$/ do | |
| Capybara.default_host = "#{@account.subdomain}.example.com" | |
| Capybara.app_host = "http://#{@account.subdomain}.example.com:9887" if Capybara.current_driver == :culerity | |
| end | |
| Given /^I visit the subdomain for the second account$/ do | |
| Capybara.default_host = "#{@second_account.subdomain}.example.com" | |
| Capybara.app_host = "http://#{@second_account.subdomain}.example.com:9887" if Capybara.current_driver == :culerity | |
| end | |
| Given /^I visit a subdomain that isn't assigned to an Account$/ do | |
| Capybara.default_host = "#{@account.subdomain}-1.example.com" | |
| Capybara.app_host = "http://#{@accounnt.subdomain}-1.example.com:9887" if Capybara.current_driver == :culerity | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment