Created
June 7, 2014 15:34
-
-
Save ralphos/a676e491bc776c7d9174 to your computer and use it in GitHub Desktop.
Feature spec setup smell
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
# ... | |
def create_seller_with_company_debtor_invoice_and_auction(args = {}) | |
company = create(:company, name: args.fetch(:company_name)) | |
debtor = create(:debtor, status: args.fetch(:debtors_status), | |
company: company) | |
seller = create(:seller, status: args.fetch(:seller_status)) | |
create(:user, email: args.fetch(:email), | |
password: args.fetch(:password), | |
account: seller, | |
company: company) | |
create(:invoice, status: args.fetch(:invoice_status), | |
debtor: debtor, | |
company: company) | |
create(:auction, total_face_value: args.fetch(:total_face_value), | |
start_date: args.fetch(:start_date), | |
end_date: args.fetch(:end_date), | |
company: company) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment