popolo 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/spec/factories.rb CHANGED
@@ -18,6 +18,7 @@ FactoryGirl.define do
18
18
  end
19
19
 
20
20
  factory :post, class: Popolo::Post do
21
+ name 'Marketing Director'
21
22
  role 'Director'
22
23
  person
23
24
  organization
@@ -1,5 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Popolo::Post do
4
- it {should validate_presence_of :organization_id}
4
+ [:role, :organization_id].each do |attribute|
5
+ it {should validate_presence_of attribute}
6
+ end
5
7
  end
@@ -14,10 +14,6 @@ describe Popolo::AreasController do
14
14
  get('/areas/1').should route_to('popolo/areas#show', id: '1')
15
15
  end
16
16
 
17
- it 'routes to #show' do
18
- get('/areas/foo').should route_to('popolo/areas#show', id: 'foo')
19
- end
20
-
21
17
  it 'routes to #nested_index' do
22
18
  get('/areas/foo/areas').should route_to('popolo/areas#nested_index', path: 'foo')
23
19
  end
@@ -14,10 +14,6 @@ describe Popolo::OrganizationsController do
14
14
  get('/organizations/1').should route_to('popolo/organizations#show', id: '1')
15
15
  end
16
16
 
17
- it 'routes to #show' do
18
- get('/organizations/foo').should route_to('popolo/organizations#show', id: 'foo')
19
- end
20
-
21
17
  it 'routes to #nested_index' do
22
18
  get('/organizations/foo/organizations').should route_to('popolo/organizations#nested_index', path: 'foo')
23
19
  end
@@ -25,5 +21,13 @@ describe Popolo::OrganizationsController do
25
21
  it 'routes to #nested_show' do
26
22
  get('/organizations/foo/bar').should route_to('popolo/organizations#nested_show', path: 'foo/bar')
27
23
  end
24
+
25
+ it 'routes to #posts' do
26
+ get('/organizations/foo/posts').should route_to('popolo/organizations#posts', path: 'foo')
27
+ end
28
+
29
+ it 'routes to #post' do
30
+ get('/organizations/foo/posts/bar').should route_to('popolo/organizations#post', path: 'foo', id: 'bar')
31
+ end
28
32
  end
29
33
  end
@@ -13,9 +13,5 @@ describe Popolo::PostsController do
13
13
  it 'routes to #show' do
14
14
  get('/posts/1').should route_to('popolo/posts#show', id: '1')
15
15
  end
16
-
17
- it 'routes to #show' do
18
- get('/posts/foo').should route_to('popolo/posts#show', id: 'foo')
19
- end
20
16
  end
21
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -261,11 +261,15 @@ files:
261
261
  - app/models/popolo/person.rb
262
262
  - app/models/popolo/post.rb
263
263
  - app/models/popolo/source.rb
264
+ - app/views/popolo/addresses/_address.html.erb
264
265
  - app/views/popolo/areas/index.html.erb
265
266
  - app/views/popolo/areas/show.html.erb
267
+ - app/views/popolo/areas_or_organizations/_breadcrumb.html.erb
266
268
  - app/views/popolo/areas_or_organizations/_index.html.erb
267
269
  - app/views/popolo/areas_or_organizations/_show.html.erb
268
270
  - app/views/popolo/organizations/index.html.erb
271
+ - app/views/popolo/organizations/post.html.erb
272
+ - app/views/popolo/organizations/posts.html.erb
269
273
  - app/views/popolo/organizations/show.html.erb
270
274
  - app/views/popolo/people/index.html.erb
271
275
  - app/views/popolo/people/show.html.erb