Skip to content

Commit

Permalink
more specs
Browse files Browse the repository at this point in the history
  • Loading branch information
nofxx committed May 9, 2009
1 parent 454940b commit d74c825
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 10 deletions.
1 change: 1 addition & 0 deletions DEVEL.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Info p/ desenvolvedores.
* Address

* Group => Pessoa Juridica
* Holder => Relation Table Person <> Group
* Documents => Cad. Documentos (CNPJ, Inscricoes, etc)
* Contact
* Address
Expand Down
2 changes: 2 additions & 0 deletions app/models/person_impairment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#
class PersonImpairment < ActiveRecord::Base
belongs_to :person
symbolize :kind, :in => [:visual, :auditive]

end

# == Schema Information
Expand Down
3 changes: 3 additions & 0 deletions spec/exemplars/holder_exemplar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Holder < ActiveRecord::Base
# generator_for :name, :method => :some_name
end
4 changes: 4 additions & 0 deletions spec/exemplars/person_impairment_exemplar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PersonImpairment < ActiveRecord::Base
generator_for :kind => "auditive"

end
3 changes: 3 additions & 0 deletions spec/exemplars/storage_exemplar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Storage < ActiveRecord::Base
#generator_for :name
end
4 changes: 2 additions & 2 deletions spec/models/holder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe Holder do
it "should create a new instance given valid attributes" do
pending
Holder.create!(@valid_attributes)
Holder.generate!
end

end
5 changes: 3 additions & 2 deletions spec/models/person_impairment_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe PersonImpairment do

it "should create a new instance given valid attributes" do
pending
PersonImpairment.create!(@valid_attributes)
PersonImpairment.generate!
end

end

# == Schema Information
Expand Down
4 changes: 2 additions & 2 deletions spec/models/storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
describe Storage do

it "should create a new instance given valid attributes" do
pending
Storage.create!(@valid_attributes)
Storage.generate!
end

end

# == Schema Information
Expand Down
3 changes: 1 addition & 2 deletions spec/views/areas/index.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
end

it "renders a list of areas" do
pending
render
response.should have_tag("tr>td", "value for name".to_s, 2)
response.should have_tag("tr>td", "value for kind".to_s, 2)
# response.should have_tag("tr>td", "value for kind".to_s, 2)
end
end

3 changes: 1 addition & 2 deletions spec/views/storages/show.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
end

it "renders attributes in <p>" do
pending
render
response.should have_text(/value\ for\ amount/)
# response.should have_text(/value\ for\ amount/)
response.should have_text(/value\ for\ unit/)
response.should have_text(/1/)
end
Expand Down

0 comments on commit d74c825

Please sign in to comment.