Sha256: 18445e5fb4a4feb5b061cb9152a3451b0e6676cca48d1105cd0d1f22e0135bf1

Contents?: true

Size: 904 Bytes

Versions: 14

Compression:

Stored size: 904 Bytes

Contents

require_relative 'spec_helper'

describe Person do
  before(:each) do
    @person = Person.new 
    @person.multipart_form_controller_action = "person_info_update"
  end
  
  it "should respond to hire_form_person_info_update" do
    @person.respond_to?(:hire_form_person_info_update?).should be_true
  end

  it "should return true for hire_form_person_info_update" do
    @person.hire_form_person_info_update?.should be_true
  end

  it "should call the name validation if the action is set" do
    @person.should have(1).error_on(:name)
  end

  it "should not call the name validtion if the action does not match the if actionon the validation" do
    @person.multipart_form_controller_action = "job_info"
    @person.should be_valid
  end

  it "should not call the name validtion if the action is not set" do
    @person.multipart_form_controller_action = nil
    @person.should be_valid
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
acts_as_multipart_form-0.0.16 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.15 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.14 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.13 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.12 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.11 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.10 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.9 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.8 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.7 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.6 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.5 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.4 spec/multipart_form_in_model_integration_spec.rb
acts_as_multipart_form-0.0.3 spec/multipart_form_in_model_integration_spec.rb