we_bridge_rails_engine_nations 0.1.0

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.
Files changed (179) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +34 -0
  7. data/Gemfile.lock +254 -0
  8. data/LICENSE.txt +21 -0
  9. data/MIT-LICENSE +20 -0
  10. data/README.md +41 -0
  11. data/Rakefile +37 -0
  12. data/app/assets/javascripts/areas.js +2 -0
  13. data/app/assets/javascripts/currencies.js +2 -0
  14. data/app/assets/javascripts/nations.js +2 -0
  15. data/app/assets/javascripts/regions.js +2 -0
  16. data/app/assets/stylesheets/areas.css +4 -0
  17. data/app/assets/stylesheets/currencies.css +4 -0
  18. data/app/assets/stylesheets/nations.css +4 -0
  19. data/app/assets/stylesheets/regions.css +4 -0
  20. data/app/assets/stylesheets/scaffold.css +56 -0
  21. data/app/controllers/areas_controller.rb +7 -0
  22. data/app/controllers/currencies_controller.rb +58 -0
  23. data/app/controllers/nations_controller.rb +7 -0
  24. data/app/controllers/regions_controller.rb +7 -0
  25. data/app/helpers/areas_helper.rb +2 -0
  26. data/app/helpers/currencies_helper.rb +2 -0
  27. data/app/helpers/nations_helper.rb +2 -0
  28. data/app/helpers/regions_helper.rb +2 -0
  29. data/app/mailers/.keep +0 -0
  30. data/app/models/.keep +0 -0
  31. data/app/models/area.rb +14 -0
  32. data/app/models/area_text.rb +7 -0
  33. data/app/models/currency.rb +26 -0
  34. data/app/models/currency_nation_map.rb +4 -0
  35. data/app/models/currency_text.rb +7 -0
  36. data/app/models/nation.rb +45 -0
  37. data/app/models/nation_text.rb +7 -0
  38. data/app/models/region.rb +15 -0
  39. data/app/models/region_text.rb +7 -0
  40. data/app/views/.keep +0 -0
  41. data/app/views/areas/edit.html.builder +1 -0
  42. data/app/views/areas/index.html.builder +1 -0
  43. data/app/views/areas/new.html.builder +1 -0
  44. data/app/views/areas/show.html.builder +1 -0
  45. data/app/views/currencies/_form.html.builder +14 -0
  46. data/app/views/currencies/edit.html.builder +7 -0
  47. data/app/views/currencies/index.html.builder +25 -0
  48. data/app/views/currencies/new.html.builder +5 -0
  49. data/app/views/currencies/show.html.builder +8 -0
  50. data/app/views/nations/edit.html.builder +1 -0
  51. data/app/views/nations/index.html.builder +1 -0
  52. data/app/views/nations/new.html.builder +1 -0
  53. data/app/views/nations/show.html.builder +1 -0
  54. data/app/views/regions/edit.html.builder +1 -0
  55. data/app/views/regions/index.html.builder +1 -0
  56. data/app/views/regions/new.html.builder +1 -0
  57. data/app/views/regions/show.html.builder +1 -0
  58. data/bin/console +14 -0
  59. data/bin/rails +12 -0
  60. data/bin/setup +7 -0
  61. data/config/routes.rb +6 -0
  62. data/db/migrate/20151127040229_create_nations.rb +27 -0
  63. data/db/migrate/20151127040410_create_regions.rb +19 -0
  64. data/db/migrate/20151127040435_create_areas.rb +19 -0
  65. data/db/migrate/20151202041711_create_currencies.rb +28 -0
  66. data/db/seeds.rb +439 -0
  67. data/lib/tasks/we_bridge_rails_engine_nations_tasks.rake +4 -0
  68. data/lib/we_bridge_rails_engine_nations.rb +7 -0
  69. data/lib/we_bridge_rails_engine_nations/engine.rb +24 -0
  70. data/lib/we_bridge_rails_engine_nations/version.rb +3 -0
  71. data/spec/controllers/areas_controller_spec.rb +169 -0
  72. data/spec/controllers/currencies_controller_spec.rb +159 -0
  73. data/spec/controllers/nations_controller_spec.rb +169 -0
  74. data/spec/controllers/regions_controller_spec.rb +169 -0
  75. data/spec/dummy/README.rdoc +28 -0
  76. data/spec/dummy/Rakefile +6 -0
  77. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  78. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  79. data/spec/dummy/app/controllers/application_controller.rb +8 -0
  80. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  81. data/spec/dummy/app/views/layouts/application.html.builder +14 -0
  82. data/spec/dummy/bin/bundle +3 -0
  83. data/spec/dummy/bin/rails +4 -0
  84. data/spec/dummy/bin/rake +4 -0
  85. data/spec/dummy/bin/setup +29 -0
  86. data/spec/dummy/config.ru +4 -0
  87. data/spec/dummy/config/application.rb +28 -0
  88. data/spec/dummy/config/boot.rb +5 -0
  89. data/spec/dummy/config/database.yml +25 -0
  90. data/spec/dummy/config/environment.rb +5 -0
  91. data/spec/dummy/config/environments/development.rb +41 -0
  92. data/spec/dummy/config/environments/production.rb +79 -0
  93. data/spec/dummy/config/environments/test.rb +42 -0
  94. data/spec/dummy/config/initializers/assets.rb +11 -0
  95. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  96. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  97. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  98. data/spec/dummy/config/initializers/inflections.rb +16 -0
  99. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  100. data/spec/dummy/config/initializers/provider_settings.rb +2 -0
  101. data/spec/dummy/config/initializers/session_store.rb +3 -0
  102. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  103. data/spec/dummy/config/locales/en.yml +23 -0
  104. data/spec/dummy/config/omniauth.yml +63 -0
  105. data/spec/dummy/config/omniauth.yml.org +63 -0
  106. data/spec/dummy/config/routes.rb +56 -0
  107. data/spec/dummy/config/secrets.yml +22 -0
  108. data/spec/dummy/db/development.sqlite3 +0 -0
  109. data/spec/dummy/db/schema.rb +221 -0
  110. data/spec/dummy/db/test.sqlite3 +0 -0
  111. data/spec/dummy/log/development.log +46295 -0
  112. data/spec/dummy/log/test.log +678 -0
  113. data/spec/dummy/public/404.html +67 -0
  114. data/spec/dummy/public/422.html +67 -0
  115. data/spec/dummy/public/500.html +66 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/3qWp1cfMUMB1L1B8w4KCdPJNoktDLzCgZhyGa-eLd0g.cache +1 -0
  118. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
  119. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6VfBYgqqzYcjALfLCOpHzv3E06n_zzoM0lDBI4rnsx0.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6vg_COhVhYBSY6arqzRJFOy9-rF95BfYQsFuol_UGuQ.cache +1 -0
  121. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Azqp0lWcLN5Iz5BDrWrNLqHomPvFzn6pENzB3pm95wo.cache +2 -0
  122. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/GYvDs3EBryNSEN-M5uVb3LOFo1oBWq0iDPijDjBVvUs.cache +1 -0
  123. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/H0uxW1DRyYygsm_fv_sMfVycqsGCazsfNJhSZU81CFY.cache +0 -0
  124. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HcVN18DR0_BmshzEZLPjkeVDruXBZ9iXjboBWmO6Ozw.cache +1 -0
  125. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JigkThideDLksj6ZrufTx6bLVyJBmNDbaouRbMbZdIA.cache +2 -0
  126. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/N2BTDMKiaaZ5__Eeqks0aWBzX-5T9Hg0d0015KmSRQo.cache +1 -0
  127. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/NrdOdaS5o4trMDBP6UBqLzFsRrmSPy7XJBBtdwktXqk.cache +1 -0
  128. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +3 -0
  129. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/bUQg5IzV2hJHu0Ua4jOdDcbaLqfzpRqx6-qq9C23sts.cache +0 -0
  130. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/boUHvgQlz503FXEZntk5rEF6Z0dNUvT4VOQquML62dQ.cache +1 -0
  131. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/g5LtU2jYJLiGyWluzwkSuH9dRStTuMGHLO-ivn8wCYE.cache +0 -0
  132. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gOWNSsYT5GN_cqGVL1MK1faY9XglwixonQVkDk9Pkvk.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/h-W0KoQGAiH7Sn5Y6HjTaVkoEceKV_LeymnmENnyLYQ.cache +0 -0
  134. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/n5wUjw8Ag9zP7pgTsene8E7Lj3RyWbqUaf2apVdzwc0.cache +2 -0
  135. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/nYdpABG_YyXwDqCH1vBNjh0m2AlewuKD9vT92xFu9Qs.cache +1 -0
  136. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/nrXgDez-J-7C7rQSEpAiK0Xj5rK37sysOLNYmJIsb_Q.cache +1 -0
  137. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/r_WSE-C4C32WlhZaTBsdC4x3Mf7EQQ93zBA3xOKSw94.cache +1 -0
  138. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/s7AiRxV9LdOVAylAE38RiKCstOIGXxlkhZ15nV8_GfY.cache +2 -0
  139. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/tXQLPTRHFdkPsB5bF6KRKGiUir3uMwdTnxE0na0vmes.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/vTbuVbqVUHIvOo23rSZvO1yTT8C-98lLVXe_JG_6Pr8.cache +1 -0
  141. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/x22RvUd8k76gbEMX05JmfJaBplbMc2omvEoreS8eAqg.cache +1 -0
  142. data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xQIYU3iVajL0UcrfbxTB8PIxGMuRDRvRjmq0ve9-s9U.cache +2 -0
  143. data/spec/factories/areas.rb +6 -0
  144. data/spec/factories/currencies.rb +6 -0
  145. data/spec/factories/nations.rb +6 -0
  146. data/spec/factories/regions.rb +6 -0
  147. data/spec/helpers/areas_helper_spec.rb +15 -0
  148. data/spec/helpers/currencies_helper_spec.rb +15 -0
  149. data/spec/helpers/nations_helper_spec.rb +15 -0
  150. data/spec/helpers/regions_helper_spec.rb +15 -0
  151. data/spec/models/area_spec.rb +5 -0
  152. data/spec/models/currency_spec.rb +24 -0
  153. data/spec/models/nation_spec.rb +24 -0
  154. data/spec/models/region_spec.rb +5 -0
  155. data/spec/rails_helper.rb +54 -0
  156. data/spec/routing/areas_routing_spec.rb +39 -0
  157. data/spec/routing/currencies_routing_spec.rb +39 -0
  158. data/spec/routing/nations_routing_spec.rb +39 -0
  159. data/spec/routing/regions_routing_spec.rb +39 -0
  160. data/spec/spec_helper.rb +2 -0
  161. data/spec/views/areas/edit.html.builder_spec.rb +14 -0
  162. data/spec/views/areas/index.html.builder_spec.rb +14 -0
  163. data/spec/views/areas/new.html.builder_spec.rb +14 -0
  164. data/spec/views/areas/show.html.builder_spec.rb +11 -0
  165. data/spec/views/currencies/edit.html.builder_spec.rb +14 -0
  166. data/spec/views/currencies/index.html.builder_spec.rb +14 -0
  167. data/spec/views/currencies/new.html.builder_spec.rb +14 -0
  168. data/spec/views/currencies/show.html.builder_spec.rb +11 -0
  169. data/spec/views/nations/edit.html.builder_spec.rb +14 -0
  170. data/spec/views/nations/index.html.builder_spec.rb +14 -0
  171. data/spec/views/nations/new.html.builder_spec.rb +14 -0
  172. data/spec/views/nations/show.html.builder_spec.rb +11 -0
  173. data/spec/views/regions/edit.html.builder_spec.rb +14 -0
  174. data/spec/views/regions/index.html.builder_spec.rb +14 -0
  175. data/spec/views/regions/new.html.builder_spec.rb +14 -0
  176. data/spec/views/regions/show.html.builder_spec.rb +11 -0
  177. data/spec/we_bridge_rails_engine_nations_spec.rb +7 -0
  178. data/we_bridge_rails_engine_nations.gemspec +42 -0
  179. metadata +482 -0
@@ -0,0 +1,5 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe Region, type: :model do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
@@ -0,0 +1,54 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV['RAILS_ENV'] ||= 'test'
3
+ require File.expand_path('../dummy/config/environment', __FILE__)
4
+ # Prevent database truncation if the environment is production
5
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
6
+ require 'spec_helper'
7
+ require 'rspec/rails'
8
+ # Add additional requires below this line. Rails is not loaded until this point!
9
+
10
+ # Requires supporting ruby files with custom matchers and macros, etc, in
11
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
12
+ # run as spec files by default. This means that files in spec/support that end
13
+ # in _spec.rb will both be required and run as specs, causing the specs to be
14
+ # run twice. It is recommended that you do not name files matching this glob to
15
+ # end with _spec.rb. You can configure this pattern with the --pattern
16
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
17
+ #
18
+ # The following line is provided for convenience purposes. It has the downside
19
+ # of increasing the boot-up time by auto-requiring all files in the support
20
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
21
+ # require only the support files necessary.
22
+ #
23
+ # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
24
+
25
+ # Checks for pending migrations before tests are run.
26
+ # If you are not using ActiveRecord, you can remove this line.
27
+ ActiveRecord::Migration.maintain_test_schema!
28
+
29
+ RSpec.configure do |config|
30
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
31
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
32
+
33
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
34
+ # examples within a transaction, remove the following line or assign false
35
+ # instead of true.
36
+ config.use_transactional_fixtures = true
37
+
38
+ # RSpec Rails can automatically mix in different behaviours to your tests
39
+ # based on their file location, for example enabling you to call `get` and
40
+ # `post` in specs under `spec/controllers`.
41
+ #
42
+ # You can disable this behaviour by removing the line below, and instead
43
+ # explicitly tag your specs with their type, e.g.:
44
+ #
45
+ # RSpec.describe UsersController, :type => :controller do
46
+ # # ...
47
+ # end
48
+ #
49
+ # The different available types are documented in the features, such as in
50
+ # https://relishapp.com/rspec/rspec-rails/docs
51
+ config.infer_spec_type_from_file_location!
52
+ end
53
+
54
+ ActiveRecord::Migrator.migrations_paths = %w(db/migrate spec/dummy/db/migrate)
@@ -0,0 +1,39 @@
1
+ require "rails_helper"
2
+
3
+ RSpec.describe AreasController, type: :routing do
4
+ describe "routing" do
5
+
6
+ it "routes to #index" do
7
+ expect(:get => "/areas").to route_to("areas#index")
8
+ end
9
+
10
+ it "routes to #new" do
11
+ expect(:get => "/areas/new").to route_to("areas#new")
12
+ end
13
+
14
+ it "routes to #show" do
15
+ expect(:get => "/areas/1").to route_to("areas#show", :id => "1")
16
+ end
17
+
18
+ it "routes to #edit" do
19
+ expect(:get => "/areas/1/edit").to route_to("areas#edit", :id => "1")
20
+ end
21
+
22
+ it "routes to #create" do
23
+ expect(:post => "/areas").to route_to("areas#create")
24
+ end
25
+
26
+ it "routes to #update via PUT" do
27
+ expect(:put => "/areas/1").to route_to("areas#update", :id => "1")
28
+ end
29
+
30
+ it "routes to #update via PATCH" do
31
+ expect(:patch => "/areas/1").to route_to("areas#update", :id => "1")
32
+ end
33
+
34
+ it "routes to #destroy" do
35
+ expect(:delete => "/areas/1").to route_to("areas#destroy", :id => "1")
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ require "rails_helper"
2
+
3
+ RSpec.describe CurrenciesController, type: :routing do
4
+ describe "routing" do
5
+
6
+ it "routes to #index" do
7
+ expect(:get => "/currencies").to route_to("currencies#index")
8
+ end
9
+
10
+ it "routes to #new" do
11
+ expect(:get => "/currencies/new").to route_to("currencies#new")
12
+ end
13
+
14
+ it "routes to #show" do
15
+ expect(:get => "/currencies/1").to route_to("currencies#show", :id => "1")
16
+ end
17
+
18
+ it "routes to #edit" do
19
+ expect(:get => "/currencies/1/edit").to route_to("currencies#edit", :id => "1")
20
+ end
21
+
22
+ it "routes to #create" do
23
+ expect(:post => "/currencies").to route_to("currencies#create")
24
+ end
25
+
26
+ it "routes to #update via PUT" do
27
+ expect(:put => "/currencies/1").to route_to("currencies#update", :id => "1")
28
+ end
29
+
30
+ it "routes to #update via PATCH" do
31
+ expect(:patch => "/currencies/1").to route_to("currencies#update", :id => "1")
32
+ end
33
+
34
+ it "routes to #destroy" do
35
+ expect(:delete => "/currencies/1").to route_to("currencies#destroy", :id => "1")
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ require "rails_helper"
2
+
3
+ RSpec.describe NationsController, type: :routing do
4
+ describe "routing" do
5
+
6
+ it "routes to #index" do
7
+ expect(:get => "/nations").to route_to("nations#index")
8
+ end
9
+
10
+ it "routes to #new" do
11
+ expect(:get => "/nations/new").to route_to("nations#new")
12
+ end
13
+
14
+ it "routes to #show" do
15
+ expect(:get => "/nations/1").to route_to("nations#show", :id => "1")
16
+ end
17
+
18
+ it "routes to #edit" do
19
+ expect(:get => "/nations/1/edit").to route_to("nations#edit", :id => "1")
20
+ end
21
+
22
+ it "routes to #create" do
23
+ expect(:post => "/nations").to route_to("nations#create")
24
+ end
25
+
26
+ it "routes to #update via PUT" do
27
+ expect(:put => "/nations/1").to route_to("nations#update", :id => "1")
28
+ end
29
+
30
+ it "routes to #update via PATCH" do
31
+ expect(:patch => "/nations/1").to route_to("nations#update", :id => "1")
32
+ end
33
+
34
+ it "routes to #destroy" do
35
+ expect(:delete => "/nations/1").to route_to("nations#destroy", :id => "1")
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ require "rails_helper"
2
+
3
+ RSpec.describe RegionsController, type: :routing do
4
+ describe "routing" do
5
+
6
+ it "routes to #index" do
7
+ expect(:get => "/regions").to route_to("regions#index")
8
+ end
9
+
10
+ it "routes to #new" do
11
+ expect(:get => "/regions/new").to route_to("regions#new")
12
+ end
13
+
14
+ it "routes to #show" do
15
+ expect(:get => "/regions/1").to route_to("regions#show", :id => "1")
16
+ end
17
+
18
+ it "routes to #edit" do
19
+ expect(:get => "/regions/1/edit").to route_to("regions#edit", :id => "1")
20
+ end
21
+
22
+ it "routes to #create" do
23
+ expect(:post => "/regions").to route_to("regions#create")
24
+ end
25
+
26
+ it "routes to #update via PUT" do
27
+ expect(:put => "/regions/1").to route_to("regions#update", :id => "1")
28
+ end
29
+
30
+ it "routes to #update via PATCH" do
31
+ expect(:patch => "/regions/1").to route_to("regions#update", :id => "1")
32
+ end
33
+
34
+ it "routes to #destroy" do
35
+ expect(:delete => "/regions/1").to route_to("regions#destroy", :id => "1")
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'we_bridge_rails_engine_nations'
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "areas/edit", type: :view do
4
+ before(:each) do
5
+ @record = assign(:record, Area.create!(name: 'Asia'))
6
+ end
7
+
8
+ it "renders the edit area form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", area_path(@record), "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "areas/index", type: :view do
4
+ before(:each) do
5
+ assign(:records, [
6
+ Area.create!(name: 'Asia'),
7
+ Area.create!(name: 'Europe')
8
+ ])
9
+ end
10
+
11
+ it "renders a list of areas" do
12
+ render
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "areas/new", type: :view do
4
+ before(:each) do
5
+ assign(:area, Area.new())
6
+ end
7
+
8
+ it "renders new area form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", areas_path, "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "areas/show", type: :view do
4
+ before(:each) do
5
+ @record = assign(:area, Area.create!(name: 'Asia'))
6
+ end
7
+
8
+ it "renders attributes in <p>" do
9
+ render
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "currencies/edit", type: :view do
4
+ before(:each) do
5
+ @currency = assign(:currency, Currency.create!())
6
+ end
7
+
8
+ it "renders the edit currency form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", currency_path(@currency), "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "currencies/index", type: :view do
4
+ before(:each) do
5
+ assign(:currencies, [
6
+ Currency.create!(),
7
+ Currency.create!()
8
+ ])
9
+ end
10
+
11
+ it "renders a list of currencies" do
12
+ render
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "currencies/new", type: :view do
4
+ before(:each) do
5
+ assign(:currency, Currency.new())
6
+ end
7
+
8
+ it "renders new currency form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", currencies_path, "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "currencies/show", type: :view do
4
+ before(:each) do
5
+ @currency = assign(:currency, Currency.create!())
6
+ end
7
+
8
+ it "renders attributes in <p>" do
9
+ render
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "nations/edit", type: :view do
4
+ before(:each) do
5
+ @record = assign(:record, Nation.create!(name: 'Japan'))
6
+ end
7
+
8
+ it "renders the edit nation form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", nation_path(@record), "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "nations/index", type: :view do
4
+ before(:each) do
5
+ assign(:records, [
6
+ Nation.create!(name: 'Japan'),
7
+ Nation.create!(name: 'USA')
8
+ ])
9
+ end
10
+
11
+ it "renders a list of nations" do
12
+ render
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "nations/new", type: :view do
4
+ before(:each) do
5
+ assign(:record, Nation.new(name: 'Japan'))
6
+ end
7
+
8
+ it "renders new nation form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", nations_path, "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "nations/show", type: :view do
4
+ before(:each) do
5
+ @record = assign(:record, Nation.create!(name: 'Japan'))
6
+ end
7
+
8
+ it "renders attributes in <p>" do
9
+ render
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "regions/edit", type: :view do
4
+ before(:each) do
5
+ @record = assign(:record, Region.create!(name: 'East Asia'))
6
+ end
7
+
8
+ it "renders the edit region form" do
9
+ render
10
+
11
+ assert_select "form[action=?][method=?]", region_path(@record), "post" do
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe "regions/index", type: :view do
4
+ before(:each) do
5
+ assign(:records, [
6
+ Region.create!(name: 'East Asia'),
7
+ Region.create!(name: 'West Europe')
8
+ ])
9
+ end
10
+
11
+ it "renders a list of regions" do
12
+ render
13
+ end
14
+ end