flowmor_router 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,4 +9,17 @@ class RoutableRecordsTest < ActionDispatch::IntegrationTest
9
9
  assert_response :success
10
10
  assert_select "h1", "Let&#39;s Test This"
11
11
  end
12
+
13
+ test "only routable routes built" do
14
+ a1 = Article.create(title: "Route This", published: true)
15
+ a2 = Article.create(title: "Ignore This", published: false)
16
+ get a1.path
17
+ assert_response :success
18
+ assert_raise FlowmorRouter::UnroutedRecord do
19
+ get a2.path
20
+ end
21
+ assert_raise ActionController::RoutingError do
22
+ get '/articles/ignore-this'
23
+ end
24
+ end
12
25
  end
@@ -24,6 +24,8 @@ class ArticleTest < ActiveSupport::TestCase
24
24
  assert_raise FlowmorRouter::UnroutableRecord do
25
25
  Article.create(title: nil).path
26
26
  end
27
- assert Article.create(title: "Dummy Article").path, '/articles/dummy-article'
27
+ assert_raise FlowmorRouter::UnroutedRecord do
28
+ assert Article.create(title: "Dummy Article").path, '/articles/dummy-article'
29
+ end
28
30
  end
29
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowmor_router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Lang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-12 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -69,6 +69,7 @@ files:
69
69
  - test/dummy/app/assets/stylesheets/blog.css
70
70
  - test/dummy/app/assets/stylesheets/static.css
71
71
  - test/dummy/app/controllers/application_controller.rb
72
+ - test/dummy/app/controllers/article_controller.rb
72
73
  - test/dummy/app/controllers/blog_controller.rb
73
74
  - test/dummy/app/controllers/static_controller.rb
74
75
  - test/dummy/app/helpers/application_helper.rb
@@ -78,6 +79,7 @@ files:
78
79
  - test/dummy/app/models/news_article.rb
79
80
  - test/dummy/app/models/post.rb
80
81
  - test/dummy/app/models/post_category.rb
82
+ - test/dummy/app/views/article/show.html.erb
81
83
  - test/dummy/app/views/blog/show.html.erb
82
84
  - test/dummy/app/views/layouts/application.html.erb
83
85
  - test/dummy/app/views/static/index.html.erb
@@ -108,6 +110,7 @@ files:
108
110
  - test/dummy/db/migrate/20140811155356_create_post_categories.rb
109
111
  - test/dummy/db/migrate/20140811182855_create_articles.rb
110
112
  - test/dummy/db/migrate/20140811184010_create_news_articles.rb
113
+ - test/dummy/db/migrate/20140818105255_add_published_to_articles.rb
111
114
  - test/dummy/db/schema.rb
112
115
  - test/dummy/db/test.sqlite3
113
116
  - test/dummy/log/development.log
@@ -177,6 +180,7 @@ test_files:
177
180
  - test/dummy/app/assets/stylesheets/blog.css
178
181
  - test/dummy/app/assets/stylesheets/static.css
179
182
  - test/dummy/app/controllers/application_controller.rb
183
+ - test/dummy/app/controllers/article_controller.rb
180
184
  - test/dummy/app/controllers/blog_controller.rb
181
185
  - test/dummy/app/controllers/static_controller.rb
182
186
  - test/dummy/app/helpers/application_helper.rb
@@ -186,6 +190,7 @@ test_files:
186
190
  - test/dummy/app/models/news_article.rb
187
191
  - test/dummy/app/models/post.rb
188
192
  - test/dummy/app/models/post_category.rb
193
+ - test/dummy/app/views/article/show.html.erb
189
194
  - test/dummy/app/views/blog/show.html.erb
190
195
  - test/dummy/app/views/layouts/application.html.erb
191
196
  - test/dummy/app/views/static/index.html.erb
@@ -216,6 +221,7 @@ test_files:
216
221
  - test/dummy/db/migrate/20140811155356_create_post_categories.rb
217
222
  - test/dummy/db/migrate/20140811182855_create_articles.rb
218
223
  - test/dummy/db/migrate/20140811184010_create_news_articles.rb
224
+ - test/dummy/db/migrate/20140818105255_add_published_to_articles.rb
219
225
  - test/dummy/db/schema.rb
220
226
  - test/dummy/db/test.sqlite3
221
227
  - test/dummy/log/development.log