Skip to content

Instantly share code, notes, and snippets.

@diegorv
Created April 16, 2009 02:19
Show Gist options
  • Select an option

  • Save diegorv/96166 to your computer and use it in GitHub Desktop.

Select an option

Save diegorv/96166 to your computer and use it in GitHub Desktop.
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe EmployeeAddress do
before(:each) do
@valid_attributes_employee = {
:name => "value for name",
:cpf => "value for cpf",
:rg => "value for rg",
:company_entry => Time.now,
:company_left => Time.now,
:salary => 9.99,
:lunch_money => 9.99
}
@employee = Employee.create!(@valid_attributes_employee)
@valid_attributes = {
:employee => @employee,
:state => "value for state",
:neighborhood => "value for neighborhood",
:street_name => "value for street_name",
:number => 1,
:complement => "value for complement",
:zipcode => "value for zipcode"
}
end
it "should create a new instance given valid attributes" do
EmployeeAddress.create!(@valid_attributes)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment