require 'rails_helper' module CustomerVault RSpec.describe "customer_vault/corporations/edit", :type => :view do before(:each) do @corporation = assign(:corporation, Corporation.create!( :name => "MyString", :email => "MyString", :phone => "MyString", :fax => "MyString" )) end it "renders the edit corporation form" do render assert_select "form[action=?][method=?]", customer_vault.corporation_path(@corporation), "post" do assert_select "input#corporation_name[name=?]", "corporation[name]" assert_select "input#corporation_email[name=?]", "corporation[email]" assert_select "input#corporation_phone[name=?]", "corporation[phone]" assert_select "input#corporation_fax[name=?]", "corporation[fax]" end end end end