Skip to content

Instantly share code, notes, and snippets.

@rafarubert
Created January 26, 2012 18:08
Show Gist options
  • Select an option

  • Save rafarubert/1684098 to your computer and use it in GitHub Desktop.

Select an option

Save rafarubert/1684098 to your computer and use it in GitHub Desktop.
context "should validate presence of country fields if country not equal BRASIL" do
before do
Country.stub!(:find).with(2).and_return({:id => 2, :name => "ARGENTINA",:created_at => Time.now , :updated_at => Time.now})
end
it { should validate_presence_of :year_of_arrival }
it { should validate_presence_of :passport }
it { should validate_presence_of :type_visa }
it { should validate_presence_of :validity_visa }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment