Sha256: a977f99678efb8c230187d62a8d0bbf95c45dd1f39df5c9a9c859138424dd863
Contents?: true
Size: 951 Bytes
Versions: 30
Compression:
Stored size: 951 Bytes
Contents
module AddressSpecHelper def complete_address_form(kind_of_address, attrs = {}) %w(first_name last_name address1 address2 city zipcode).each do | attr | fill_in "order_#{kind_of_address}_address_attributes_#{attr}", with: attrs[attr.to_sym] end select 'United States', from: "order_#{kind_of_address}_address_attributes_country_code" select 'Alabama', from: "order_#{kind_of_address}_address_attributes_state_code" end def fill_good_address address = build(:shipping_address) fill_in 'First name', with: address[:first_name] fill_in 'Last name', with: address[:last_name] fill_in 'Address1', with: address[:address1] fill_in 'Address2', with: 'Highway' fill_in 'City', with: address[:city] select 'United States', from: 'Country' select 'Alabama', from: 'State/Province' fill_in 'Zipcode', with: address[:zipcode] end end
Version data entries
30 entries across 30 versions & 1 rubygems