h2ocube_rails_helper 0.0.16 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -2
  3. data/Gemfile +0 -3
  4. data/README.md +0 -1
  5. data/Rakefile +7 -7
  6. data/h2ocube_rails_helper.gemspec +9 -1
  7. data/h2ocube_rails_helper.sublime-project +15 -0
  8. data/lib/h2ocube_rails_helper.rb +93 -89
  9. data/spec/fake_app/models.rb +14 -0
  10. data/spec/fake_app/rails_app.rb +33 -0
  11. data/spec/helpers/render_canonical_spec.rb +16 -0
  12. data/spec/helpers/render_description_spec.rb +37 -0
  13. data/spec/helpers/render_ga_spec.rb +38 -0
  14. data/{test/render_html_class_test.rb → spec/helpers/render_html_class_spec.rb} +44 -45
  15. data/spec/helpers/render_keywords_spec.rb +39 -0
  16. data/spec/helpers/render_title_spec.rb +56 -0
  17. data/spec/spec_helper.rb +24 -0
  18. metadata +120 -57
  19. data/test/dummy/Rakefile +0 -7
  20. data/test/dummy/app/controllers/application_controller.rb +0 -3
  21. data/test/dummy/app/helpers/application_helper.rb +0 -2
  22. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  23. data/test/dummy/config.ru +0 -4
  24. data/test/dummy/config/application.rb +0 -20
  25. data/test/dummy/config/boot.rb +0 -10
  26. data/test/dummy/config/database.yml +0 -22
  27. data/test/dummy/config/environment.rb +0 -5
  28. data/test/dummy/config/environments/development.rb +0 -23
  29. data/test/dummy/config/environments/production.rb +0 -49
  30. data/test/dummy/config/environments/test.rb +0 -24
  31. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  32. data/test/dummy/config/initializers/inflections.rb +0 -10
  33. data/test/dummy/config/initializers/mime_types.rb +0 -5
  34. data/test/dummy/config/initializers/secret_token.rb +0 -7
  35. data/test/dummy/config/initializers/session_store.rb +0 -8
  36. data/test/dummy/config/locales/en.yml +0 -5
  37. data/test/dummy/config/routes.rb +0 -58
  38. data/test/dummy/script/rails +0 -6
  39. data/test/render_canonical_test.rb +0 -16
  40. data/test/render_description_test.rb +0 -37
  41. data/test/render_ga_test.rb +0 -37
  42. data/test/render_keywords_test.rb +0 -41
  43. data/test/render_title_test.rb +0 -56
  44. data/test/test_helper.rb +0 -7
@@ -1,56 +0,0 @@
1
- require 'test_helper'
2
-
3
- class RenderTitleClass < ActionView::TestCase
4
- test 'simple' do
5
- self.class_eval do
6
- undef_method :resource
7
- end
8
- assert_equal render_title, '<title>title</title>'
9
- end
10
-
11
- test '@title' do
12
- @title = '@title'
13
- assert_equal render_title, '<title>@title - title</title>'
14
- @title = ['@title', ' ', '', nil]
15
- assert_equal render_title, '<title>@title - title</title>'
16
- end
17
-
18
- test 'resource' do
19
- def resource
20
- Resource.new
21
- end
22
-
23
- assert_equal render_title, '<title>Resource Name - Class Name - title</title>'
24
- end
25
-
26
- test '@_title' do
27
- @_title = '@_title'
28
- assert_equal render_title, '<title>@_title</title>'
29
- end
30
-
31
- test 'opts' do
32
- assert_equal render_title(title: 'opts'), '<title>opts</title>'
33
- end
34
- end
35
-
36
- class HelperSettings
37
- def self.title
38
- 'title'
39
- end
40
- end
41
-
42
- class ResourceModelName
43
- def human
44
- 'Class Name'
45
- end
46
- end
47
-
48
- class Resource
49
- def title
50
- 'Resource Name'
51
- end
52
-
53
- def self.model_name
54
- ResourceModelName.new
55
- end
56
- end
data/test/test_helper.rb DELETED
@@ -1,7 +0,0 @@
1
- # Configure Rails Envinronment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
- require "rails/test_help"
6
-
7
- Rails.backtrace_cleaner.remove_silencers!