Created
December 4, 2009 16:08
-
-
Save robmerrell/249107 to your computer and use it in GitHub Desktop.
This file contains 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
# this step creates an account with the name specified and changes the host to use the | |
# new subdomain generated by the account factory. | |
Given /^an account called "(.*)"$/ do |name| | |
account = Factory(:account, :name => name) # "Factory" is from factory girl | |
host! "#{account.cname}.local" | |
end | |
# use the step like this | |
Scenario: A made up scenario | |
Given an account called "mycompany" | |
And I am logged in as an administrative user | |
... | |
# just for reference, here is my account factory | |
Factory.define :account do |f| | |
f.association :subscription | |
f.name "testing" | |
f.sequence(:cname) { |n| "testcname#{n}" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment