Skip to content

Commit

Permalink
Start creating an Address value object.
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed Jan 7, 2009
1 parent b5ab716 commit 748478d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/address.rb
@@ -0,0 +1,3 @@
class Address
attr_reader :street, :street2
end
15 changes: 15 additions & 0 deletions spec/models/address_spec.rb
@@ -0,0 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Address do
describe '(fields)' do
before(:each) do
@address = Address.new
end

it "should have two street fields" do
[:street, :street2].each do |m|
@address.should respond_to(m)
end
end
end
end

0 comments on commit 748478d

Please sign in to comment.