From 7fc886f43cea7eb7b3928aa127c673b4db44ca10 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Sun, 16 Nov 2014 12:01:27 +1100 Subject: [PATCH] implement custom Sweeper class as stop gap against errors when running specs --- .rspec | 1 + app/models/comment_sweeper.rb | 2 +- app/models/crop_sweeper.rb | 2 +- app/models/forum_sweeper.rb | 2 +- app/models/garden_sweeper.rb | 2 +- app/models/member_sweeper.rb | 2 +- app/models/photo_sweeper.rb | 2 +- app/models/planting_sweeper.rb | 2 +- app/models/post_sweeper.rb | 2 +- app/models/scientific_name_sweeper.rb | 2 +- app/models/seed_sweeper.rb | 2 +- app/models/sweeper.rb | 5 + .../account_types_controller_spec.rb | 2 +- spec/controllers/accounts_controller_spec.rb | 2 +- .../admin/orders_controller_spec.rb | 2 +- spec/controllers/admin_controller_spec.rb | 2 +- .../authentications_controller_spec.rb | 2 +- spec/controllers/comments_controller_spec.rb | 2 +- spec/controllers/crops_controller_spec.rb | 2 +- spec/controllers/forums_controller_spec.rb | 2 +- spec/controllers/gardens_controller_spec.rb | 2 +- spec/controllers/harvests_controller_spec.rb | 2 +- spec/controllers/home_controller_spec.rb | 2 +- spec/controllers/member_controller_spec.rb | 2 +- .../notifications_controller_spec.rb | 2 +- .../order_items_controller_spec.rb | 2 +- spec/controllers/orders_controller_spec.rb | 2 +- spec/controllers/photos_controller_spec.rb | 2 +- spec/controllers/places_controller_spec.rb | 2 +- .../plant_parts_controller_spec.rb | 2 +- spec/controllers/plantings_controller_spec.rb | 2 +- spec/controllers/posts_controller_spec.rb | 2 +- spec/controllers/products_controller_spec.rb | 2 +- .../registrations_controller_spec.rb | 2 +- spec/controllers/roles_controller_spec.rb | 2 +- .../scientific_names_controller_spec.rb | 2 +- spec/controllers/seeds_controller_spec.rb | 2 +- spec/controllers/shop_controller_spec.rb | 2 +- spec/features/admin/account_types_spec.rb | 2 +- spec/features/admin/forums_spec.rb | 2 +- spec/features/alternate_name_spec.rb | 2 +- spec/features/crop_wranglers_spec.rb | 2 +- spec/features/crops/crop_detail_page_spec.rb | 2 +- spec/features/footer_spec.rb | 2 +- spec/features/gardens_spec.rb | 2 +- .../harvests/harvesting_a_crop_spec.rb | 2 +- spec/features/locale_spec.rb | 2 +- spec/features/member_profile_spec.rb | 2 +- spec/features/planting_reminder_spec.rb | 2 +- .../plantings/planting_a_crop_spec.rb | 2 +- spec/features/scientific_name_spec.rb | 2 +- spec/features/seeds/adding_seeds_spec.rb | 2 +- spec/features/seeds/misc_seeds_spec.rb | 2 +- spec/features/shared_examples/crop_suggest.rb | 2 +- spec/features/signin_spec.rb | 2 +- spec/features/signup_spec.rb | 2 +- spec/helpers/application_helper.rb | 2 +- spec/helpers/harvests_helper_spec.rb | 2 +- spec/helpers/notifications_helper_spec.rb | 2 +- .../lib/haml/filters/escaped_markdown_spec.rb | 2 +- .../haml/filters/growstuff_markdown_spec.rb | 2 +- spec/mailers/notifier_spec.rb | 2 +- spec/models/ability_spec.rb | 2 +- spec/models/account_spec.rb | 2 +- spec/models/account_type_spec.rb | 2 +- spec/models/alternate_name_spec.rb | 2 +- spec/models/authentication_spec.rb | 2 +- spec/models/comment_spec.rb | 2 +- spec/models/crop_spec.rb | 2 +- spec/models/forum_spec.rb | 2 +- spec/models/garden_spec.rb | 2 +- spec/models/harvest_spec.rb | 2 +- spec/models/member_spec.rb | 2 +- spec/models/notification_spec.rb | 2 +- spec/models/order_item_spec.rb | 2 +- spec/models/order_spec.rb | 2 +- spec/models/photo_spec.rb | 2 +- spec/models/plant_part_spec.rb | 2 +- spec/models/planting_spec.rb | 2 +- spec/models/post_spec.rb | 2 +- spec/models/product_spec.rb | 2 +- spec/models/role_spec.rb | 2 +- spec/models/scientific_name_spec.rb | 2 +- spec/models/seed_spec.rb | 2 +- spec/rails_helper.rb | 90 ++++++++++++ spec/requests/authentications_spec.rb | 2 +- spec/requests/comments_spec.rb | 2 +- spec/requests/forums_spec.rb | 2 +- spec/requests/gardens_spec.rb | 2 +- spec/requests/harvests_spec.rb | 2 +- spec/requests/notifications_spec.rb | 2 +- spec/requests/photos_spec.rb | 2 +- spec/requests/plant_parts_spec.rb | 2 +- spec/requests/plantings_spec.rb | 2 +- spec/requests/post_spec.rb | 2 +- spec/requests/scientific_names_spec.rb | 2 +- spec/requests/seeds_spec.rb | 2 +- spec/routing/account_types_routing_spec.rb | 2 +- spec/routing/authentications_routing_spec.rb | 2 +- spec/routing/comments_routing_spec.rb | 2 +- spec/routing/crops_routing_spec.rb | 2 +- spec/routing/forums_routing_spec.rb | 2 +- spec/routing/gardens_routing_spec.rb | 2 +- spec/routing/harvests_routing_spec.rb | 2 +- spec/routing/notifications_routing_spec.rb | 2 +- spec/routing/order_items_routing_spec.rb | 2 +- spec/routing/orders_routing_spec.rb | 2 +- spec/routing/photos_routing_spec.rb | 2 +- spec/routing/plant_parts_routing_spec.rb | 2 +- spec/routing/plantings_routing_spec.rb | 2 +- spec/routing/products_routing_spec.rb | 2 +- spec/routing/roles_routing_spec.rb | 2 +- spec/routing/scientific_names_routing_spec.rb | 2 +- spec/routing/seeds_routing_spec.rb | 2 +- spec/routing/updates_routing_spec.rb | 2 +- spec/spec_helper.rb | 135 ++++++++++-------- spec/views/about/contact_spec.rb | 2 +- .../account_types/edit.html.haml_spec.rb | 2 +- .../account_types/index.html.haml_spec.rb | 2 +- .../views/account_types/new.html.haml_spec.rb | 2 +- .../account_types/show.html.haml_spec.rb | 2 +- spec/views/accounts/edit.html.haml_spec.rb | 2 +- spec/views/accounts/index.html.haml_spec.rb | 2 +- spec/views/accounts/new.html.haml_spec.rb | 2 +- spec/views/accounts/show.html.haml_spec.rb | 2 +- spec/views/admin/index_spec.rb | 2 +- spec/views/admin/newsletter_spec.rb | 2 +- spec/views/admin/orders/index_spec.rb | 2 +- .../authentications/index.html.haml_spec.rb | 2 +- spec/views/comments/edit.html.haml_spec.rb | 2 +- spec/views/comments/index.html.haml_spec.rb | 2 +- spec/views/comments/index.rss.haml_spec.rb | 2 +- spec/views/comments/new.html.haml_spec.rb | 2 +- spec/views/comments/show.html.haml_spec.rb | 2 +- spec/views/crops/_grown_for.html.haml_spec.rb | 2 +- .../crops/_planting_advice.html.haml_spec.rb | 2 +- spec/views/crops/_popover.html.haml_spec.rb | 2 +- spec/views/crops/edit.html.haml_spec.rb | 2 +- spec/views/crops/hierarchy.html.haml_spec.rb | 2 +- spec/views/crops/index.html.haml_spec.rb | 2 +- spec/views/crops/index.rss.haml_spec.rb | 2 +- spec/views/crops/new.html.haml_spec.rb | 2 +- spec/views/crops/search.html.haml_spec.rb | 2 +- spec/views/crops/wrangle.html.haml_spec.rb | 2 +- .../mailer/confirmation_instructions_spec.rb | 2 +- .../reset_password_instructions_spec.rb | 2 +- .../devise/mailer/unlock_instructions_spec.rb | 2 +- spec/views/devise/registrations/edit_spec.rb | 2 +- spec/views/devise/registrations/new_spec.rb | 2 +- spec/views/devise/sessions/new_spec.rb | 2 +- spec/views/devise/unlocks/new_spec.rb | 2 +- spec/views/forums/edit.html.haml_spec.rb | 2 +- spec/views/forums/index.html.haml_spec.rb | 2 +- spec/views/forums/new.html.haml_spec.rb | 2 +- spec/views/forums/show.html.haml_spec.rb | 2 +- spec/views/gardens/edit.html.haml_spec.rb | 2 +- spec/views/gardens/index.html.haml_spec.rb | 2 +- spec/views/gardens/new.html.haml_spec.rb | 2 +- spec/views/gardens/show.html.haml_spec.rb | 2 +- spec/views/harvests/edit.html.haml_spec.rb | 2 +- spec/views/harvests/index.html.haml_spec.rb | 2 +- spec/views/harvests/new.html.haml_spec.rb | 2 +- spec/views/harvests/show.html.haml_spec.rb | 2 +- spec/views/home/_blurb.html.haml_spec.rb | 2 +- spec/views/home/_crops.html.haml_spec.rb | 2 +- .../home/_keep_in_touch.html.haml_spec.rb | 2 +- spec/views/home/_members.html.haml_spec.rb | 2 +- spec/views/home/_open.html.haml_spec.rb | 2 +- spec/views/home/_seeds.html.haml_spec.rb | 2 +- spec/views/home/_stats.html.haml_spec.rb | 2 +- spec/views/home/index_spec.rb | 2 +- spec/views/layouts/_footer_spec.rb | 2 +- spec/views/layouts/_header_spec.rb | 2 +- spec/views/layouts/_meta_spec.rb | 2 +- spec/views/layouts/application_spec.rb | 2 +- .../views/members/_location.html.haml_spec.rb | 2 +- spec/views/members/index.html.haml_spec.rb | 2 +- spec/views/members/show.rss.haml_spec.rb | 2 +- .../notifications/index.html.haml_spec.rb | 2 +- .../views/notifications/new.html.haml_spec.rb | 2 +- .../notifications/show.html.haml_spec.rb | 2 +- spec/views/notifier/notify.html.haml_spec.rb | 2 +- spec/views/orders/index.html.haml_spec.rb | 2 +- spec/views/orders/show.html.haml_spec.rb | 2 +- spec/views/photos/edit.html.haml_spec.rb | 2 +- spec/views/photos/index.html.haml_spec.rb | 2 +- spec/views/photos/new.html.haml_spec.rb | 2 +- spec/views/photos/show.html.haml_spec.rb | 2 +- .../places/_map_attribution.html.haml_spec.rb | 2 +- spec/views/places/index.html.haml_spec.rb | 2 +- spec/views/places/show.html.haml_spec.rb | 2 +- spec/views/plant_parts/edit.html.haml_spec.rb | 2 +- .../views/plant_parts/index.html.haml_spec.rb | 2 +- spec/views/plant_parts/new.html.haml_spec.rb | 2 +- spec/views/plant_parts/show.html.haml_spec.rb | 2 +- spec/views/plantings/_form.html.haml_spec.rb | 2 +- .../plantings/_thumbnail.html.haml_spec.rb | 2 +- spec/views/plantings/edit.html.haml_spec.rb | 2 +- spec/views/plantings/index.html.haml_spec.rb | 2 +- spec/views/plantings/index.rss.haml_spec.rb | 2 +- spec/views/plantings/new.html.haml_spec.rb | 2 +- spec/views/plantings/show.html.haml_spec.rb | 2 +- spec/views/policy/community_spec.rb | 2 +- spec/views/policy/tos_spec.rb | 2 +- spec/views/posts/_single.html.haml_spec.rb | 2 +- spec/views/posts/edit.html.haml_spec.rb | 2 +- spec/views/posts/index.html.haml_spec.rb | 2 +- spec/views/posts/index.rss.haml_spec.rb | 2 +- spec/views/posts/new.html.haml_spec.rb | 2 +- spec/views/posts/show.html.haml_spec.rb | 2 +- spec/views/posts/show.rss.haml_spec.rb | 2 +- spec/views/products/edit.html.haml_spec.rb | 2 +- spec/views/products/index.html.haml_spec.rb | 2 +- spec/views/products/new.html.haml_spec.rb | 2 +- spec/views/products/show.html.haml_spec.rb | 2 +- spec/views/roles/edit.html.haml_spec.rb | 2 +- spec/views/roles/index.html.haml_spec.rb | 2 +- spec/views/roles/new.html.haml_spec.rb | 2 +- spec/views/roles/show.html.haml_spec.rb | 2 +- .../scientific_names/edit.html.haml_spec.rb | 2 +- .../scientific_names/index.html.haml_spec.rb | 2 +- .../scientific_names/new.html.haml_spec.rb | 2 +- .../scientific_names/show.html.haml_spec.rb | 2 +- spec/views/seeds/edit.html.haml_spec.rb | 2 +- spec/views/seeds/index.html.haml_spec.rb | 2 +- spec/views/seeds/index.rss.haml_spec.rb | 2 +- spec/views/seeds/new.html.haml_spec.rb | 2 +- spec/views/seeds/show.html.haml_spec.rb | 2 +- spec/views/shop/index_spec.rb | 2 +- spec/views/support/index_spec.rb | 2 +- 230 files changed, 395 insertions(+), 288 deletions(-) create mode 100644 app/models/sweeper.rb create mode 100644 spec/rails_helper.rb diff --git a/.rspec b/.rspec index 4e1e0d2f7..83e16f804 100644 --- a/.rspec +++ b/.rspec @@ -1 +1,2 @@ --color +--require spec_helper diff --git a/app/models/comment_sweeper.rb b/app/models/comment_sweeper.rb index fed7b6f4c..d226d0e7c 100644 --- a/app/models/comment_sweeper.rb +++ b/app/models/comment_sweeper.rb @@ -1,4 +1,4 @@ -class CommentSweeper < ActionController::Caching::Sweeper +class CommentSweeper < Sweeper observe Comment def after_create(comment) diff --git a/app/models/crop_sweeper.rb b/app/models/crop_sweeper.rb index fef9927f3..14d83f0bd 100644 --- a/app/models/crop_sweeper.rb +++ b/app/models/crop_sweeper.rb @@ -1,4 +1,4 @@ -class CropSweeper < ActionController::Caching::Sweeper +class CropSweeper < Sweeper observe Crop def after_create(crop) diff --git a/app/models/forum_sweeper.rb b/app/models/forum_sweeper.rb index cccffc524..f71613d21 100644 --- a/app/models/forum_sweeper.rb +++ b/app/models/forum_sweeper.rb @@ -1,4 +1,4 @@ -class ForumSweeper < ActionController::Caching::Sweeper +class ForumSweeper < Sweeper observe Forum def after_create(forum) diff --git a/app/models/garden_sweeper.rb b/app/models/garden_sweeper.rb index 3913a7c11..a5688d75b 100644 --- a/app/models/garden_sweeper.rb +++ b/app/models/garden_sweeper.rb @@ -1,4 +1,4 @@ -class GardenSweeper < ActionController::Caching::Sweeper +class GardenSweeper < Sweeper observe Garden def after_create(garden) diff --git a/app/models/member_sweeper.rb b/app/models/member_sweeper.rb index 205131e19..fe53ba38d 100644 --- a/app/models/member_sweeper.rb +++ b/app/models/member_sweeper.rb @@ -1,4 +1,4 @@ -class MemberSweeper < ActionController::Caching::Sweeper +class MemberSweeper < Sweeper observe Member def after_create(member) diff --git a/app/models/photo_sweeper.rb b/app/models/photo_sweeper.rb index 1bb388b11..63f463279 100644 --- a/app/models/photo_sweeper.rb +++ b/app/models/photo_sweeper.rb @@ -1,4 +1,4 @@ -class PhotoSweeper < ActionController::Caching::Sweeper +class PhotoSweeper < Sweeper observe Photo def after_create(photo) diff --git a/app/models/planting_sweeper.rb b/app/models/planting_sweeper.rb index 8e8de10df..aea3f08e0 100644 --- a/app/models/planting_sweeper.rb +++ b/app/models/planting_sweeper.rb @@ -1,4 +1,4 @@ -class PlantingSweeper < ActionController::Caching::Sweeper +class PlantingSweeper < Sweeper observe Planting def after_create(planting) diff --git a/app/models/post_sweeper.rb b/app/models/post_sweeper.rb index e6ad03427..08ae39c7a 100644 --- a/app/models/post_sweeper.rb +++ b/app/models/post_sweeper.rb @@ -1,4 +1,4 @@ -class PostSweeper < ActionController::Caching::Sweeper +class PostSweeper < Sweeper observe Post def after_create(post) diff --git a/app/models/scientific_name_sweeper.rb b/app/models/scientific_name_sweeper.rb index 2ac626526..89b894639 100644 --- a/app/models/scientific_name_sweeper.rb +++ b/app/models/scientific_name_sweeper.rb @@ -1,4 +1,4 @@ -class ScientificNameSweeper < ActionController::Caching::Sweeper +class ScientificNameSweeper < Sweeper observe ScientificName def after_create(scientific_name) diff --git a/app/models/seed_sweeper.rb b/app/models/seed_sweeper.rb index 1b7d663a4..755cdd810 100644 --- a/app/models/seed_sweeper.rb +++ b/app/models/seed_sweeper.rb @@ -1,4 +1,4 @@ -class SeedSweeper < ActionController::Caching::Sweeper +class SeedSweeper < Sweeper observe Seed def after_create(seed) diff --git a/app/models/sweeper.rb b/app/models/sweeper.rb new file mode 100644 index 000000000..99da9ee93 --- /dev/null +++ b/app/models/sweeper.rb @@ -0,0 +1,5 @@ +class Sweeper < ActionController::Caching::Sweeper + include ActionController::Caching::Fragments + + +end \ No newline at end of file diff --git a/spec/controllers/account_types_controller_spec.rb b/spec/controllers/account_types_controller_spec.rb index 6beee69b6..a22146a79 100644 --- a/spec/controllers/account_types_controller_spec.rb +++ b/spec/controllers/account_types_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AccountTypesController do diff --git a/spec/controllers/accounts_controller_spec.rb b/spec/controllers/accounts_controller_spec.rb index 31ac5b014..eb2ff7f65 100644 --- a/spec/controllers/accounts_controller_spec.rb +++ b/spec/controllers/accounts_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AccountsController do diff --git a/spec/controllers/admin/orders_controller_spec.rb b/spec/controllers/admin/orders_controller_spec.rb index 090bbb68b..08dfb9933 100644 --- a/spec/controllers/admin/orders_controller_spec.rb +++ b/spec/controllers/admin/orders_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Admin::OrdersController do diff --git a/spec/controllers/admin_controller_spec.rb b/spec/controllers/admin_controller_spec.rb index 76f56b78a..fc31f80b9 100644 --- a/spec/controllers/admin_controller_spec.rb +++ b/spec/controllers/admin_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AdminController do diff --git a/spec/controllers/authentications_controller_spec.rb b/spec/controllers/authentications_controller_spec.rb index 8add74c8c..4fc5b98a5 100644 --- a/spec/controllers/authentications_controller_spec.rb +++ b/spec/controllers/authentications_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AuthenticationsController do diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb index 6b830180a..0e10ffe42 100644 --- a/spec/controllers/comments_controller_spec.rb +++ b/spec/controllers/comments_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe CommentsController do diff --git a/spec/controllers/crops_controller_spec.rb b/spec/controllers/crops_controller_spec.rb index 997aa71a9..5cfe9f4d1 100644 --- a/spec/controllers/crops_controller_spec.rb +++ b/spec/controllers/crops_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe CropsController do diff --git a/spec/controllers/forums_controller_spec.rb b/spec/controllers/forums_controller_spec.rb index 324c46120..369919ff6 100644 --- a/spec/controllers/forums_controller_spec.rb +++ b/spec/controllers/forums_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ForumsController do diff --git a/spec/controllers/gardens_controller_spec.rb b/spec/controllers/gardens_controller_spec.rb index 242ec6ffa..2bba8a2f8 100644 --- a/spec/controllers/gardens_controller_spec.rb +++ b/spec/controllers/gardens_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe GardensController do diff --git a/spec/controllers/harvests_controller_spec.rb b/spec/controllers/harvests_controller_spec.rb index 38b0edf8c..9ced0cece 100644 --- a/spec/controllers/harvests_controller_spec.rb +++ b/spec/controllers/harvests_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe HarvestsController do diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index bfbfc6adf..da5edc384 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe HomeController do diff --git a/spec/controllers/member_controller_spec.rb b/spec/controllers/member_controller_spec.rb index ff5a0ae42..35d5b0c6d 100644 --- a/spec/controllers/member_controller_spec.rb +++ b/spec/controllers/member_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe MembersController do diff --git a/spec/controllers/notifications_controller_spec.rb b/spec/controllers/notifications_controller_spec.rb index 99add1cf4..d55b7df26 100644 --- a/spec/controllers/notifications_controller_spec.rb +++ b/spec/controllers/notifications_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe NotificationsController do diff --git a/spec/controllers/order_items_controller_spec.rb b/spec/controllers/order_items_controller_spec.rb index a33c55cc3..c8d23a4fd 100644 --- a/spec/controllers/order_items_controller_spec.rb +++ b/spec/controllers/order_items_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe OrderItemsController do diff --git a/spec/controllers/orders_controller_spec.rb b/spec/controllers/orders_controller_spec.rb index 9fecc3695..d01f37f92 100644 --- a/spec/controllers/orders_controller_spec.rb +++ b/spec/controllers/orders_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe OrdersController do diff --git a/spec/controllers/photos_controller_spec.rb b/spec/controllers/photos_controller_spec.rb index 1c3b47780..2dd7a6a56 100644 --- a/spec/controllers/photos_controller_spec.rb +++ b/spec/controllers/photos_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PhotosController do diff --git a/spec/controllers/places_controller_spec.rb b/spec/controllers/places_controller_spec.rb index 7d5841a6d..0c83c206a 100644 --- a/spec/controllers/places_controller_spec.rb +++ b/spec/controllers/places_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PlacesController do before :each do diff --git a/spec/controllers/plant_parts_controller_spec.rb b/spec/controllers/plant_parts_controller_spec.rb index 9aefaa953..e813e0f38 100644 --- a/spec/controllers/plant_parts_controller_spec.rb +++ b/spec/controllers/plant_parts_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PlantPartsController do diff --git a/spec/controllers/plantings_controller_spec.rb b/spec/controllers/plantings_controller_spec.rb index 4b3a518a5..aa6fcbe4e 100644 --- a/spec/controllers/plantings_controller_spec.rb +++ b/spec/controllers/plantings_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PlantingsController do diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb index bbb8bdccb..8121b318e 100644 --- a/spec/controllers/posts_controller_spec.rb +++ b/spec/controllers/posts_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PostsController do diff --git a/spec/controllers/products_controller_spec.rb b/spec/controllers/products_controller_spec.rb index f2daad383..5804ad09d 100644 --- a/spec/controllers/products_controller_spec.rb +++ b/spec/controllers/products_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ProductsController do diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 0ba0e29e6..8c0a669b4 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe RegistrationsController do diff --git a/spec/controllers/roles_controller_spec.rb b/spec/controllers/roles_controller_spec.rb index 0665101b4..f34bb79e3 100644 --- a/spec/controllers/roles_controller_spec.rb +++ b/spec/controllers/roles_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe RolesController do diff --git a/spec/controllers/scientific_names_controller_spec.rb b/spec/controllers/scientific_names_controller_spec.rb index 254ebf1c8..45dd92066 100644 --- a/spec/controllers/scientific_names_controller_spec.rb +++ b/spec/controllers/scientific_names_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ScientificNamesController do diff --git a/spec/controllers/seeds_controller_spec.rb b/spec/controllers/seeds_controller_spec.rb index d41fe7c3b..7b0da6593 100644 --- a/spec/controllers/seeds_controller_spec.rb +++ b/spec/controllers/seeds_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe SeedsController do describe "GET index" do diff --git a/spec/controllers/shop_controller_spec.rb b/spec/controllers/shop_controller_spec.rb index 2aaaa58ff..626757b52 100644 --- a/spec/controllers/shop_controller_spec.rb +++ b/spec/controllers/shop_controller_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ShopController do diff --git a/spec/features/admin/account_types_spec.rb b/spec/features/admin/account_types_spec.rb index 2f8cda09f..b56144344 100644 --- a/spec/features/admin/account_types_spec.rb +++ b/spec/features/admin/account_types_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "account types" do context "admin user" do diff --git a/spec/features/admin/forums_spec.rb b/spec/features/admin/forums_spec.rb index a5c6f4fb1..e9f8a43f9 100644 --- a/spec/features/admin/forums_spec.rb +++ b/spec/features/admin/forums_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "forums" do context "admin user" do diff --git a/spec/features/alternate_name_spec.rb b/spec/features/alternate_name_spec.rb index 086584c40..8ec2a21fe 100644 --- a/spec/features/alternate_name_spec.rb +++ b/spec/features/alternate_name_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Alternate names" do let!(:alternate_eggplant) { FactoryGirl.create(:alternate_eggplant) } diff --git a/spec/features/crop_wranglers_spec.rb b/spec/features/crop_wranglers_spec.rb index 32c96e639..b8d525a3f 100644 --- a/spec/features/crop_wranglers_spec.rb +++ b/spec/features/crop_wranglers_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "crop wranglers" do context "signed in member" do diff --git a/spec/features/crops/crop_detail_page_spec.rb b/spec/features/crops/crop_detail_page_spec.rb index a941cb075..a9740c131 100644 --- a/spec/features/crops/crop_detail_page_spec.rb +++ b/spec/features/crops/crop_detail_page_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "crop detail page" do diff --git a/spec/features/footer_spec.rb b/spec/features/footer_spec.rb index aa8449b15..7187793c1 100644 --- a/spec/features/footer_spec.rb +++ b/spec/features/footer_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "footer" do scenario "contact page has Twitter link" do diff --git a/spec/features/gardens_spec.rb b/spec/features/gardens_spec.rb index 1b803a41e..972b269f7 100644 --- a/spec/features/gardens_spec.rb +++ b/spec/features/gardens_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Planting a crop", :js => true do let!(:garden) { FactoryGirl.create(:garden) } diff --git a/spec/features/harvests/harvesting_a_crop_spec.rb b/spec/features/harvests/harvesting_a_crop_spec.rb index caffb237d..40c0eb8f8 100644 --- a/spec/features/harvests/harvesting_a_crop_spec.rb +++ b/spec/features/harvests/harvesting_a_crop_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Harvesting a crop", :js => true do let(:member) { FactoryGirl.create(:member) } diff --git a/spec/features/locale_spec.rb b/spec/features/locale_spec.rb index b5893858d..36b07b5c9 100644 --- a/spec/features/locale_spec.rb +++ b/spec/features/locale_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Changing locales" do diff --git a/spec/features/member_profile_spec.rb b/spec/features/member_profile_spec.rb index 809b052a8..ad5082e3f 100644 --- a/spec/features/member_profile_spec.rb +++ b/spec/features/member_profile_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "member profile" do diff --git a/spec/features/planting_reminder_spec.rb b/spec/features/planting_reminder_spec.rb index 5adb44095..3b8c88bf8 100644 --- a/spec/features/planting_reminder_spec.rb +++ b/spec/features/planting_reminder_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' require 'capybara/email/rspec' feature "Planting reminder email", :js => true do diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index 99114ab43..4d53b7117 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" feature "Planting a crop", :js => true do let(:member) { FactoryGirl.create(:member) } diff --git a/spec/features/scientific_name_spec.rb b/spec/features/scientific_name_spec.rb index 1fda79d42..c6cd60c6a 100644 --- a/spec/features/scientific_name_spec.rb +++ b/spec/features/scientific_name_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Scientific names" do let!(:zea_mays) { FactoryGirl.create(:zea_mays) } diff --git a/spec/features/seeds/adding_seeds_spec.rb b/spec/features/seeds/adding_seeds_spec.rb index ca79c5b8c..668771850 100644 --- a/spec/features/seeds/adding_seeds_spec.rb +++ b/spec/features/seeds/adding_seeds_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "Harvesting a crop", :js => true do let(:member) { FactoryGirl.create(:member) } diff --git a/spec/features/seeds/misc_seeds_spec.rb b/spec/features/seeds/misc_seeds_spec.rb index e72e3b68f..f962d4c4e 100644 --- a/spec/features/seeds/misc_seeds_spec.rb +++ b/spec/features/seeds/misc_seeds_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "seeds" do context "signed in user" do diff --git a/spec/features/shared_examples/crop_suggest.rb b/spec/features/shared_examples/crop_suggest.rb index 499bab891..141dfbabf 100644 --- a/spec/features/shared_examples/crop_suggest.rb +++ b/spec/features/shared_examples/crop_suggest.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' shared_examples "crop suggest" do |resource| let!(:popcorn) { FactoryGirl.create(:popcorn) } diff --git a/spec/features/signin_spec.rb b/spec/features/signin_spec.rb index b4a5eb7bb..4cefddbf0 100644 --- a/spec/features/signin_spec.rb +++ b/spec/features/signin_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "signin" do let(:member){FactoryGirl.create(:member)} diff --git a/spec/features/signup_spec.rb b/spec/features/signup_spec.rb index 9962df359..c91ad4682 100644 --- a/spec/features/signup_spec.rb +++ b/spec/features/signup_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' feature "signup" do diff --git a/spec/helpers/application_helper.rb b/spec/helpers/application_helper.rb index 912ffbfd5..9a39e59a7 100644 --- a/spec/helpers/application_helper.rb +++ b/spec/helpers/application_helper.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ApplicationHelper do it "formats prices" do diff --git a/spec/helpers/harvests_helper_spec.rb b/spec/helpers/harvests_helper_spec.rb index ecc30a51e..7bc516162 100644 --- a/spec/helpers/harvests_helper_spec.rb +++ b/spec/helpers/harvests_helper_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe HarvestsHelper do describe "display_quantity" do diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb index 9db3a95aa..85f96d664 100644 --- a/spec/helpers/notifications_helper_spec.rb +++ b/spec/helpers/notifications_helper_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe NotificationsHelper do describe "reply_link" do diff --git a/spec/lib/haml/filters/escaped_markdown_spec.rb b/spec/lib/haml/filters/escaped_markdown_spec.rb index 9e2c1ce1f..60066160f 100644 --- a/spec/lib/haml/filters/escaped_markdown_spec.rb +++ b/spec/lib/haml/filters/escaped_markdown_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' require 'haml/filters' require 'haml/filters/escaped_markdown' require 'haml/helpers' diff --git a/spec/lib/haml/filters/growstuff_markdown_spec.rb b/spec/lib/haml/filters/growstuff_markdown_spec.rb index 718645322..8abe8aee4 100644 --- a/spec/lib/haml/filters/growstuff_markdown_spec.rb +++ b/spec/lib/haml/filters/growstuff_markdown_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' require 'haml/filters' require 'haml/filters/growstuff_markdown' diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb index 6ade0fb78..4c7ac59a3 100644 --- a/spec/mailers/notifier_spec.rb +++ b/spec/mailers/notifier_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe Notifier do diff --git a/spec/models/ability_spec.rb b/spec/models/ability_spec.rb index 06ac61b7c..4eccf8916 100644 --- a/spec/models/ability_spec.rb +++ b/spec/models/ability_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' require 'cancan/matchers' describe Ability do diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 8b2acd470..b1765ccc0 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Account do before(:each) do diff --git a/spec/models/account_type_spec.rb b/spec/models/account_type_spec.rb index 8dfe24bf7..c65c113ba 100644 --- a/spec/models/account_type_spec.rb +++ b/spec/models/account_type_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AccountType do end diff --git a/spec/models/alternate_name_spec.rb b/spec/models/alternate_name_spec.rb index f7acd0efc..7819586cc 100644 --- a/spec/models/alternate_name_spec.rb +++ b/spec/models/alternate_name_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe AlternateName do let(:an) { FactoryGirl.create(:alternate_eggplant) } diff --git a/spec/models/authentication_spec.rb b/spec/models/authentication_spec.rb index 2a9df9aec..0159361ff 100644 --- a/spec/models/authentication_spec.rb +++ b/spec/models/authentication_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Authentication do diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index d487d0b91..d54cd5606 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Comment do diff --git a/spec/models/crop_spec.rb b/spec/models/crop_spec.rb index 661a688a3..76740cdfe 100644 --- a/spec/models/crop_spec.rb +++ b/spec/models/crop_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Crop do context 'all fields present' do diff --git a/spec/models/forum_spec.rb b/spec/models/forum_spec.rb index 98ce1c24a..9769882c6 100644 --- a/spec/models/forum_spec.rb +++ b/spec/models/forum_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Forum do before(:each) do diff --git a/spec/models/garden_spec.rb b/spec/models/garden_spec.rb index 8bf355cd0..2ff2f7436 100644 --- a/spec/models/garden_spec.rb +++ b/spec/models/garden_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Garden do before :each do diff --git a/spec/models/harvest_spec.rb b/spec/models/harvest_spec.rb index e1bc76ee7..504c8c414 100644 --- a/spec/models/harvest_spec.rb +++ b/spec/models/harvest_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Harvest do diff --git a/spec/models/member_spec.rb b/spec/models/member_spec.rb index 49b66ef71..0fb6cdacc 100644 --- a/spec/models/member_spec.rb +++ b/spec/models/member_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'member' do diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index a8bddb9fa..27924ebed 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Notification do before(:each) do diff --git a/spec/models/order_item_spec.rb b/spec/models/order_item_spec.rb index e12cc9fbf..20c0be94f 100644 --- a/spec/models/order_item_spec.rb +++ b/spec/models/order_item_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe OrderItem do before(:each) do diff --git a/spec/models/order_spec.rb b/spec/models/order_spec.rb index 60e98ac4d..50fb6f949 100644 --- a/spec/models/order_spec.rb +++ b/spec/models/order_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Order do before(:each) do diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index f17127301..850fa42cc 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Photo do diff --git a/spec/models/plant_part_spec.rb b/spec/models/plant_part_spec.rb index 45536afe4..f8dc1f290 100644 --- a/spec/models/plant_part_spec.rb +++ b/spec/models/plant_part_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe PlantPart do it 'stringifies' do diff --git a/spec/models/planting_spec.rb b/spec/models/planting_spec.rb index 0f64a53f1..fba4fabe1 100644 --- a/spec/models/planting_spec.rb +++ b/spec/models/planting_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Planting do diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index 30c19c500..adce855d2 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Post do before(:each) do diff --git a/spec/models/product_spec.rb b/spec/models/product_spec.rb index 59339a8c9..af1a02ba5 100644 --- a/spec/models/product_spec.rb +++ b/spec/models/product_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Product do diff --git a/spec/models/role_spec.rb b/spec/models/role_spec.rb index 5a74d6165..6ea5d1a9d 100644 --- a/spec/models/role_spec.rb +++ b/spec/models/role_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Role do let(:member) { FactoryGirl.create(:member) } diff --git a/spec/models/scientific_name_spec.rb b/spec/models/scientific_name_spec.rb index 496cf4dad..d8404d0ba 100644 --- a/spec/models/scientific_name_spec.rb +++ b/spec/models/scientific_name_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe ScientificName do context 'all fields present' do diff --git a/spec/models/seed_spec.rb b/spec/models/seed_spec.rb index 355edac10..6a134a47e 100644 --- a/spec/models/seed_spec.rb +++ b/spec/models/seed_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe Seed do diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 000000000..0ab8f09fc --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,90 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV["RAILS_ENV"] ||= 'test' +require 'spec_helper' +require File.expand_path("../../config/environment", __FILE__) +require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! +require 'rspec/autorun' +require 'simplecov' +require 'coveralls' +require 'rails-observers' + +# output coverage locally AND send it to coveralls +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] + +# fail if there's a significant test coverage drop +SimpleCov.maximum_coverage_drop 1 + +SimpleCov.start :rails do + add_filter 'spec/' + add_filter 'vendor/' +end + +require 'capybara' +require 'capybara/poltergeist' +Capybara.javascript_driver = :poltergeist +Capybara.app_host = 'http://localhost' +Capybara.server_port = 8080 + +include Warden::Test::Helpers + +# Requires supporting ruby files with custom matchers and macros, etc, in +# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are +# run as spec files by default. This means that files in spec/support that end +# in _spec.rb will both be required and run as specs, causing the specs to be +# run twice. It is recommended that you do not name files matching this glob to +# end with _spec.rb. You can configure this pattern with the --pattern +# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. +# +# The following line is provided for convenience purposes. It has the downside +# of increasing the boot-up time by auto-requiring all files in the support +# directory. Alternatively, in the individual `*_spec.rb` files, manually +# require only the support files necessary. +# +Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } +Dir[Rails.root.join("spec/features/shared_examples/**/*.rb")].each {|f| require f} + +# Checks for pending migrations before tests are run. +# If you are not using ActiveRecord, you can remove this line. +ActiveRecord::Migration.maintain_test_schema! + +RSpec.configure do |config| + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + # config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = false + + # If true, the base class of anonymous controllers will be inferred + # automatically. This will be the default behavior in future versions of + # rspec-rails. + config.infer_base_class_for_anonymous_controllers = false + + # RSpec Rails can automatically mix in different behaviours to your tests + # based on their file location, for example enabling you to call `get` and + # `post` in specs under `spec/controllers`. + # + # You can disable this behaviour by removing the line below, and instead + # explicitly tag your specs with their type, e.g.: + # + # RSpec.describe UsersController, :type => :controller do + # # ... + # end + # + # The different available types are documented in the features, such as in + # https://relishapp.com/rspec/rspec-rails/docs + config.infer_spec_type_from_file_location! + + # controller specs require this to work with Devise + # see https://github.com/plataformatec/devise/wiki/How-To%3a-Controllers-and-Views-tests-with-Rails-3-%28and-rspec%29 + config.include Devise::TestHelpers, :type => :controller + config.extend ControllerMacros, :type => :controller + config.before(:each) do + Sweeper.any_instance.stub(:expire_fragment) + end +end diff --git a/spec/requests/authentications_spec.rb b/spec/requests/authentications_spec.rb index f50942928..6cc612f44 100644 --- a/spec/requests/authentications_spec.rb +++ b/spec/requests/authentications_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Authentications" do describe "GET /authentications" do diff --git a/spec/requests/comments_spec.rb b/spec/requests/comments_spec.rb index 7a38a46e8..c9b2ba9dc 100644 --- a/spec/requests/comments_spec.rb +++ b/spec/requests/comments_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Comments" do describe "GET /comments" do diff --git a/spec/requests/forums_spec.rb b/spec/requests/forums_spec.rb index ee85dacfd..ff7cb283d 100644 --- a/spec/requests/forums_spec.rb +++ b/spec/requests/forums_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Forums" do describe "GET /forums" do diff --git a/spec/requests/gardens_spec.rb b/spec/requests/gardens_spec.rb index bc8cd3ec2..91a8dc8b7 100644 --- a/spec/requests/gardens_spec.rb +++ b/spec/requests/gardens_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Gardens" do describe "GET /gardens" do diff --git a/spec/requests/harvests_spec.rb b/spec/requests/harvests_spec.rb index edb408b0b..f3774b3c0 100644 --- a/spec/requests/harvests_spec.rb +++ b/spec/requests/harvests_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Harvests" do describe "GET /harvests" do diff --git a/spec/requests/notifications_spec.rb b/spec/requests/notifications_spec.rb index 62031013e..85afbdd9f 100644 --- a/spec/requests/notifications_spec.rb +++ b/spec/requests/notifications_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Notifications" do describe "GET /notifications" do diff --git a/spec/requests/photos_spec.rb b/spec/requests/photos_spec.rb index bfb595245..b937ded3d 100644 --- a/spec/requests/photos_spec.rb +++ b/spec/requests/photos_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Photos" do describe "GET /photos" do diff --git a/spec/requests/plant_parts_spec.rb b/spec/requests/plant_parts_spec.rb index 4f607b22f..1fc2150b2 100644 --- a/spec/requests/plant_parts_spec.rb +++ b/spec/requests/plant_parts_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "PlantParts" do describe "GET /plant_parts" do diff --git a/spec/requests/plantings_spec.rb b/spec/requests/plantings_spec.rb index cc5580f58..cb66922e0 100644 --- a/spec/requests/plantings_spec.rb +++ b/spec/requests/plantings_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Plantings" do describe "GET /plantings" do diff --git a/spec/requests/post_spec.rb b/spec/requests/post_spec.rb index 5cfcf60bf..3bb479aa8 100644 --- a/spec/requests/post_spec.rb +++ b/spec/requests/post_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Posts" do describe "GET /posts" do diff --git a/spec/requests/scientific_names_spec.rb b/spec/requests/scientific_names_spec.rb index 0b2d8dd5a..922f6f270 100644 --- a/spec/requests/scientific_names_spec.rb +++ b/spec/requests/scientific_names_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "ScientificNames" do describe "GET /scientific_names" do diff --git a/spec/requests/seeds_spec.rb b/spec/requests/seeds_spec.rb index ac3ee1076..8bc5aeccf 100644 --- a/spec/requests/seeds_spec.rb +++ b/spec/requests/seeds_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "Seeds" do describe "GET /seeds" do diff --git a/spec/routing/account_types_routing_spec.rb b/spec/routing/account_types_routing_spec.rb index 456cedebe..440c16956 100644 --- a/spec/routing/account_types_routing_spec.rb +++ b/spec/routing/account_types_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe AccountTypesController do describe "routing" do diff --git a/spec/routing/authentications_routing_spec.rb b/spec/routing/authentications_routing_spec.rb index 1a639dead..db574d686 100644 --- a/spec/routing/authentications_routing_spec.rb +++ b/spec/routing/authentications_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe AuthenticationsController do describe "routing" do diff --git a/spec/routing/comments_routing_spec.rb b/spec/routing/comments_routing_spec.rb index 73c80563e..4a0fe8026 100644 --- a/spec/routing/comments_routing_spec.rb +++ b/spec/routing/comments_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe CommentsController do describe "routing" do diff --git a/spec/routing/crops_routing_spec.rb b/spec/routing/crops_routing_spec.rb index 450ad30f3..1e1fe4aac 100644 --- a/spec/routing/crops_routing_spec.rb +++ b/spec/routing/crops_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe CropsController do describe "routing" do diff --git a/spec/routing/forums_routing_spec.rb b/spec/routing/forums_routing_spec.rb index c783d5199..4bd7d6097 100644 --- a/spec/routing/forums_routing_spec.rb +++ b/spec/routing/forums_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe ForumsController do describe "routing" do diff --git a/spec/routing/gardens_routing_spec.rb b/spec/routing/gardens_routing_spec.rb index e3fbd6f31..1c627e091 100644 --- a/spec/routing/gardens_routing_spec.rb +++ b/spec/routing/gardens_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe GardensController do describe "routing" do diff --git a/spec/routing/harvests_routing_spec.rb b/spec/routing/harvests_routing_spec.rb index 66ab7151e..8b34d920a 100644 --- a/spec/routing/harvests_routing_spec.rb +++ b/spec/routing/harvests_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe HarvestsController do describe "routing" do diff --git a/spec/routing/notifications_routing_spec.rb b/spec/routing/notifications_routing_spec.rb index 421a443b3..35f54689f 100644 --- a/spec/routing/notifications_routing_spec.rb +++ b/spec/routing/notifications_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe NotificationsController do describe "routing" do diff --git a/spec/routing/order_items_routing_spec.rb b/spec/routing/order_items_routing_spec.rb index 1993db17d..858a873ad 100644 --- a/spec/routing/order_items_routing_spec.rb +++ b/spec/routing/order_items_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe OrderItemsController do describe "routing" do diff --git a/spec/routing/orders_routing_spec.rb b/spec/routing/orders_routing_spec.rb index 77e2c131d..7fc9735ee 100644 --- a/spec/routing/orders_routing_spec.rb +++ b/spec/routing/orders_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe OrdersController do describe "routing" do diff --git a/spec/routing/photos_routing_spec.rb b/spec/routing/photos_routing_spec.rb index d7dc394ed..5bdfeca07 100644 --- a/spec/routing/photos_routing_spec.rb +++ b/spec/routing/photos_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe PhotosController do describe "routing" do diff --git a/spec/routing/plant_parts_routing_spec.rb b/spec/routing/plant_parts_routing_spec.rb index 419b4a05e..54d02caa1 100644 --- a/spec/routing/plant_parts_routing_spec.rb +++ b/spec/routing/plant_parts_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe PlantPartsController do describe "routing" do diff --git a/spec/routing/plantings_routing_spec.rb b/spec/routing/plantings_routing_spec.rb index 08fb24301..bf3e1e8b8 100644 --- a/spec/routing/plantings_routing_spec.rb +++ b/spec/routing/plantings_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe PlantingsController do describe "routing" do diff --git a/spec/routing/products_routing_spec.rb b/spec/routing/products_routing_spec.rb index e50a77956..a9c2fa004 100644 --- a/spec/routing/products_routing_spec.rb +++ b/spec/routing/products_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe ProductsController do describe "routing" do diff --git a/spec/routing/roles_routing_spec.rb b/spec/routing/roles_routing_spec.rb index 4084a6e7e..0a7900f9d 100644 --- a/spec/routing/roles_routing_spec.rb +++ b/spec/routing/roles_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe RolesController do describe "routing" do diff --git a/spec/routing/scientific_names_routing_spec.rb b/spec/routing/scientific_names_routing_spec.rb index c78d1ff7d..00c049289 100644 --- a/spec/routing/scientific_names_routing_spec.rb +++ b/spec/routing/scientific_names_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe ScientificNamesController do describe "routing" do diff --git a/spec/routing/seeds_routing_spec.rb b/spec/routing/seeds_routing_spec.rb index d4746d299..4fe46774a 100644 --- a/spec/routing/seeds_routing_spec.rb +++ b/spec/routing/seeds_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe SeedsController do describe "routing" do diff --git a/spec/routing/updates_routing_spec.rb b/spec/routing/updates_routing_spec.rb index 0266d9686..9ff2b5ccd 100644 --- a/spec/routing/updates_routing_spec.rb +++ b/spec/routing/updates_routing_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "rails_helper" describe PostsController do describe "routing" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9176aea29..a9872e6f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,74 +1,85 @@ -# This file is copied to spec/ when you run 'rails generate rspec:install' -ENV["RAILS_ENV"] ||= 'test' - -require File.expand_path("../../config/environment", __FILE__) -require 'rspec/rails' -require 'rspec/autorun' - -require 'simplecov' -require 'coveralls' - -# output coverage locally AND send it to coveralls -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter -] - -# fail if there's a significant test coverage drop -SimpleCov.maximum_coverage_drop 1 - -SimpleCov.start :rails do - add_filter 'spec/' - add_filter 'vendor/' -end - -require 'capybara' -require 'capybara/poltergeist' -Capybara.javascript_driver = :poltergeist -Capybara.app_host = 'http://localhost' -Capybara.server_port = 8080 - -include Warden::Test::Helpers - -# Requires supporting ruby files with custom matchers and macros, etc, -# in spec/support/ and its subdirectories. -Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} -Dir[Rails.root.join("spec/features/shared_examples/**/*.rb")].each {|f| require f} - +# This file was generated by the `rails generate rspec:install` command. Conventionally, all +# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. +# The generated `.rspec` file contains `--require spec_helper` which will cause this +# file to always be loaded, without a need to explicitly require it in any files. +# +# Given that it is always loaded, you are encouraged to keep this file as +# light-weight as possible. Requiring heavyweight dependencies from this file +# will add to the boot time of your test suite on EVERY test run, even for an +# individual file that may not need all of that loaded. Instead, consider making +# a separate helper file that requires the additional dependencies and performs +# the additional setup, and require it from the spec files that actually need it. +# +# The `.rspec` file also contains a few flags that are not defaults but that +# users commonly want. +# +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| - # ## Mock Framework - # - # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line - # - # config.mock_with :mocha - # config.mock_with :flexmock - # config.mock_with :rr + # rspec-expectations config goes here. You can use an alternate + # assertion/expectation library such as wrong or the stdlib/minitest + # assertions if you prefer. + config.expect_with :rspec do |expectations| + # This option will default to `true` in RSpec 4. It makes the `description` + # and `failure_message` of custom matchers include text for helper methods + # defined using `chain`, e.g.: + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" + # ...rather than: + # # => "be bigger than 2" + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + end - # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - # config.fixture_path = "#{::Rails.root}/spec/fixtures" + # rspec-mocks config goes here. You can use an alternate test double + # library (such as bogus or mocha) by changing the `mock_with` option here. + config.mock_with :rspec do |mocks| + # Prevents you from mocking or stubbing a method that does not exist on + # a real object. This is generally recommended, and will default to + # `true` in RSpec 4. + mocks.verify_partial_doubles = true + end - # If you're not using ActiveRecord, or you'd prefer not to run each of your - # examples within a transaction, remove the following line or assign false - # instead of true. - config.use_transactional_fixtures = false +# The settings below are suggested to provide a good initial experience +# with RSpec, but feel free to customize to your heart's content. - # If true, the base class of anonymous controllers will be inferred - # automatically. This will be the default behavior in future versions of - # rspec-rails. - config.infer_base_class_for_anonymous_controllers = false + # These two settings work together to allow you to limit a spec run + # to individual examples or groups you care about by tagging them with + # `:focus` metadata. When nothing is tagged with `:focus`, all examples + # get run. + config.filter_run :focus + config.run_all_when_everything_filtered = true + + # Limits the available syntax to the non-monkey patched syntax that is recommended. + # For more details, see: + # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax + # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching + # config.disable_monkey_patching! + + # Many RSpec users commonly either run the entire suite or an individual + # file, and it's useful to allow more verbose output when running an + # individual spec file. + if config.files_to_run.one? + # Use the documentation formatter for detailed output, + # unless a formatter has already been configured + # (e.g. via a command-line flag). + config.default_formatter = 'doc' + end + + # Print the 10 slowest examples and example groups at the + # end of the spec run, to help surface which specs are running + # particularly slow. + config.profile_examples = 3 # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 - config.order = "random" + config.order = :random - # controller specs require this to work with Devise - # see https://github.com/plataformatec/devise/wiki/How-To%3a-Controllers-and-Views-tests-with-Rails-3-%28and-rspec%29 - config.include Devise::TestHelpers, :type => :controller - config.extend ControllerMacros, :type => :controller + # Seed global randomization in this process using the `--seed` CLI option. + # Setting this allows you to use `--seed` to deterministically reproduce + # test failures related to randomization by passing the same `--seed` value + # as the one that triggered the failure. + Kernel.srand config.seed - config.before(:each) do - ActionController::Caching::Sweeper.any_instance.stub(:expire_fragment) - end end diff --git a/spec/views/about/contact_spec.rb b/spec/views/about/contact_spec.rb index 85d232126..2dcd31c9d 100644 --- a/spec/views/about/contact_spec.rb +++ b/spec/views/about/contact_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'about/contact.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/account_types/edit.html.haml_spec.rb b/spec/views/account_types/edit.html.haml_spec.rb index bb5fbf433..cf77a0402 100644 --- a/spec/views/account_types/edit.html.haml_spec.rb +++ b/spec/views/account_types/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "account_types/edit" do before(:each) do diff --git a/spec/views/account_types/index.html.haml_spec.rb b/spec/views/account_types/index.html.haml_spec.rb index cded5ef32..1bbd0dc72 100644 --- a/spec/views/account_types/index.html.haml_spec.rb +++ b/spec/views/account_types/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "account_types/index" do before(:each) do diff --git a/spec/views/account_types/new.html.haml_spec.rb b/spec/views/account_types/new.html.haml_spec.rb index 3babc2fb9..a9e97ee54 100644 --- a/spec/views/account_types/new.html.haml_spec.rb +++ b/spec/views/account_types/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "account_types/new" do before(:each) do diff --git a/spec/views/account_types/show.html.haml_spec.rb b/spec/views/account_types/show.html.haml_spec.rb index 941026cf4..bee9cebd5 100644 --- a/spec/views/account_types/show.html.haml_spec.rb +++ b/spec/views/account_types/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "account_types/show" do before(:each) do diff --git a/spec/views/accounts/edit.html.haml_spec.rb b/spec/views/accounts/edit.html.haml_spec.rb index af3931dfa..124ec1d12 100644 --- a/spec/views/accounts/edit.html.haml_spec.rb +++ b/spec/views/accounts/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "accounts/edit" do before(:each) do diff --git a/spec/views/accounts/index.html.haml_spec.rb b/spec/views/accounts/index.html.haml_spec.rb index 56e76b0ff..e8c0f1a79 100644 --- a/spec/views/accounts/index.html.haml_spec.rb +++ b/spec/views/accounts/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "accounts/index" do before(:each) do diff --git a/spec/views/accounts/new.html.haml_spec.rb b/spec/views/accounts/new.html.haml_spec.rb index ab60cc346..3a2b7cdbc 100644 --- a/spec/views/accounts/new.html.haml_spec.rb +++ b/spec/views/accounts/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "accounts/new" do before(:each) do diff --git a/spec/views/accounts/show.html.haml_spec.rb b/spec/views/accounts/show.html.haml_spec.rb index 5b429e13e..99ea2f1a0 100644 --- a/spec/views/accounts/show.html.haml_spec.rb +++ b/spec/views/accounts/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "accounts/show" do before(:each) do diff --git a/spec/views/admin/index_spec.rb b/spec/views/admin/index_spec.rb index fe92a4193..744ac639d 100644 --- a/spec/views/admin/index_spec.rb +++ b/spec/views/admin/index_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'admin/index.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/admin/newsletter_spec.rb b/spec/views/admin/newsletter_spec.rb index a0d871cd4..a3b5e67f6 100644 --- a/spec/views/admin/newsletter_spec.rb +++ b/spec/views/admin/newsletter_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'admin/newsletter.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/admin/orders/index_spec.rb b/spec/views/admin/orders/index_spec.rb index bc49a0028..e4279fdd0 100644 --- a/spec/views/admin/orders/index_spec.rb +++ b/spec/views/admin/orders/index_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'admin/orders/index.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/authentications/index.html.haml_spec.rb b/spec/views/authentications/index.html.haml_spec.rb index f780966ae..8fa3ba9b8 100644 --- a/spec/views/authentications/index.html.haml_spec.rb +++ b/spec/views/authentications/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "authentications/index" do before(:each) do diff --git a/spec/views/comments/edit.html.haml_spec.rb b/spec/views/comments/edit.html.haml_spec.rb index beee78013..87ba9c549 100644 --- a/spec/views/comments/edit.html.haml_spec.rb +++ b/spec/views/comments/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "comments/edit" do before(:each) do diff --git a/spec/views/comments/index.html.haml_spec.rb b/spec/views/comments/index.html.haml_spec.rb index 3cf270149..e0260e207 100644 --- a/spec/views/comments/index.html.haml_spec.rb +++ b/spec/views/comments/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "comments/index" do before(:each) do diff --git a/spec/views/comments/index.rss.haml_spec.rb b/spec/views/comments/index.rss.haml_spec.rb index e5eeeac95..f4d767800 100644 --- a/spec/views/comments/index.rss.haml_spec.rb +++ b/spec/views/comments/index.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'comments/index.rss.haml' do before(:each) do diff --git a/spec/views/comments/new.html.haml_spec.rb b/spec/views/comments/new.html.haml_spec.rb index a27868a16..6b92ce27c 100644 --- a/spec/views/comments/new.html.haml_spec.rb +++ b/spec/views/comments/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "comments/new" do before(:each) do diff --git a/spec/views/comments/show.html.haml_spec.rb b/spec/views/comments/show.html.haml_spec.rb index 9c2af0496..a24dd4136 100644 --- a/spec/views/comments/show.html.haml_spec.rb +++ b/spec/views/comments/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "comments/show" do before(:each) do diff --git a/spec/views/crops/_grown_for.html.haml_spec.rb b/spec/views/crops/_grown_for.html.haml_spec.rb index 3950c1d32..47a475371 100644 --- a/spec/views/crops/_grown_for.html.haml_spec.rb +++ b/spec/views/crops/_grown_for.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/_grown_for" do before(:each) do diff --git a/spec/views/crops/_planting_advice.html.haml_spec.rb b/spec/views/crops/_planting_advice.html.haml_spec.rb index f92fe2bd7..875ee6eef 100644 --- a/spec/views/crops/_planting_advice.html.haml_spec.rb +++ b/spec/views/crops/_planting_advice.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/_planting_advice" do before(:each) do diff --git a/spec/views/crops/_popover.html.haml_spec.rb b/spec/views/crops/_popover.html.haml_spec.rb index ad07f8ada..f9dc0d325 100644 --- a/spec/views/crops/_popover.html.haml_spec.rb +++ b/spec/views/crops/_popover.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/_popover" do before(:each) do diff --git a/spec/views/crops/edit.html.haml_spec.rb b/spec/views/crops/edit.html.haml_spec.rb index 3db9c52b0..eaf76a092 100644 --- a/spec/views/crops/edit.html.haml_spec.rb +++ b/spec/views/crops/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/edit" do before(:each) do diff --git a/spec/views/crops/hierarchy.html.haml_spec.rb b/spec/views/crops/hierarchy.html.haml_spec.rb index e5fbc7883..22b02d18f 100644 --- a/spec/views/crops/hierarchy.html.haml_spec.rb +++ b/spec/views/crops/hierarchy.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/hierarchy" do before(:each) do diff --git a/spec/views/crops/index.html.haml_spec.rb b/spec/views/crops/index.html.haml_spec.rb index ca0ecc39b..0c0554afa 100644 --- a/spec/views/crops/index.html.haml_spec.rb +++ b/spec/views/crops/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/index" do before(:each) do diff --git a/spec/views/crops/index.rss.haml_spec.rb b/spec/views/crops/index.rss.haml_spec.rb index f0c5ac653..4c19c5f26 100644 --- a/spec/views/crops/index.rss.haml_spec.rb +++ b/spec/views/crops/index.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'crops/index.rss.haml' do before(:each) do diff --git a/spec/views/crops/new.html.haml_spec.rb b/spec/views/crops/new.html.haml_spec.rb index 0aa443f74..0c834d738 100644 --- a/spec/views/crops/new.html.haml_spec.rb +++ b/spec/views/crops/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/new" do before(:each) do diff --git a/spec/views/crops/search.html.haml_spec.rb b/spec/views/crops/search.html.haml_spec.rb index c186c6c4c..352d9730d 100644 --- a/spec/views/crops/search.html.haml_spec.rb +++ b/spec/views/crops/search.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/search" do before(:each) do diff --git a/spec/views/crops/wrangle.html.haml_spec.rb b/spec/views/crops/wrangle.html.haml_spec.rb index a4adde063..a91663c09 100644 --- a/spec/views/crops/wrangle.html.haml_spec.rb +++ b/spec/views/crops/wrangle.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "crops/wrangle" do before(:each) do diff --git a/spec/views/devise/mailer/confirmation_instructions_spec.rb b/spec/views/devise/mailer/confirmation_instructions_spec.rb index 3a0921ae7..368446247 100644 --- a/spec/views/devise/mailer/confirmation_instructions_spec.rb +++ b/spec/views/devise/mailer/confirmation_instructions_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/mailer/confirmation_instructions.html.haml', :type => "view" do diff --git a/spec/views/devise/mailer/reset_password_instructions_spec.rb b/spec/views/devise/mailer/reset_password_instructions_spec.rb index 5c3a4f222..48944f266 100644 --- a/spec/views/devise/mailer/reset_password_instructions_spec.rb +++ b/spec/views/devise/mailer/reset_password_instructions_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/mailer/reset_password_instructions.html.haml', :type => "view" do diff --git a/spec/views/devise/mailer/unlock_instructions_spec.rb b/spec/views/devise/mailer/unlock_instructions_spec.rb index 9cbca83a4..02a2bd182 100644 --- a/spec/views/devise/mailer/unlock_instructions_spec.rb +++ b/spec/views/devise/mailer/unlock_instructions_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/mailer/unlock_instructions.html.haml', :type => "view" do context "logged in" do before(:each) do diff --git a/spec/views/devise/registrations/edit_spec.rb b/spec/views/devise/registrations/edit_spec.rb index f9c48ec1a..8e9c11087 100644 --- a/spec/views/devise/registrations/edit_spec.rb +++ b/spec/views/devise/registrations/edit_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/registrations/edit.html.haml', :type => "view" do diff --git a/spec/views/devise/registrations/new_spec.rb b/spec/views/devise/registrations/new_spec.rb index b17b000b7..3c03ba7aa 100644 --- a/spec/views/devise/registrations/new_spec.rb +++ b/spec/views/devise/registrations/new_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/registrations/new.html.haml', :type => "view" do diff --git a/spec/views/devise/sessions/new_spec.rb b/spec/views/devise/sessions/new_spec.rb index 9a178e63f..f795b1d55 100644 --- a/spec/views/devise/sessions/new_spec.rb +++ b/spec/views/devise/sessions/new_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/sessions/new.html.haml', :type => "view" do diff --git a/spec/views/devise/unlocks/new_spec.rb b/spec/views/devise/unlocks/new_spec.rb index 0259691fe..2d1b8f705 100644 --- a/spec/views/devise/unlocks/new_spec.rb +++ b/spec/views/devise/unlocks/new_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'devise/unlocks/new.html.haml', :type => "view" do diff --git a/spec/views/forums/edit.html.haml_spec.rb b/spec/views/forums/edit.html.haml_spec.rb index 306f3bbf0..8a49b38be 100644 --- a/spec/views/forums/edit.html.haml_spec.rb +++ b/spec/views/forums/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "forums/edit" do before(:each) do diff --git a/spec/views/forums/index.html.haml_spec.rb b/spec/views/forums/index.html.haml_spec.rb index d2046de48..99ea944ea 100644 --- a/spec/views/forums/index.html.haml_spec.rb +++ b/spec/views/forums/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "forums/index" do before(:each) do diff --git a/spec/views/forums/new.html.haml_spec.rb b/spec/views/forums/new.html.haml_spec.rb index bfda7bfa1..86043eb8c 100644 --- a/spec/views/forums/new.html.haml_spec.rb +++ b/spec/views/forums/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "forums/new" do before(:each) do diff --git a/spec/views/forums/show.html.haml_spec.rb b/spec/views/forums/show.html.haml_spec.rb index 735f5d482..2e61541fe 100644 --- a/spec/views/forums/show.html.haml_spec.rb +++ b/spec/views/forums/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "forums/show" do before(:each) do diff --git a/spec/views/gardens/edit.html.haml_spec.rb b/spec/views/gardens/edit.html.haml_spec.rb index 781274c2c..e5381c324 100644 --- a/spec/views/gardens/edit.html.haml_spec.rb +++ b/spec/views/gardens/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "gardens/edit" do diff --git a/spec/views/gardens/index.html.haml_spec.rb b/spec/views/gardens/index.html.haml_spec.rb index 123a75db9..a075822be 100644 --- a/spec/views/gardens/index.html.haml_spec.rb +++ b/spec/views/gardens/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "gardens/index" do before(:each) do diff --git a/spec/views/gardens/new.html.haml_spec.rb b/spec/views/gardens/new.html.haml_spec.rb index 5e7d4c1e7..ff52f1f28 100644 --- a/spec/views/gardens/new.html.haml_spec.rb +++ b/spec/views/gardens/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "gardens/new" do before(:each) do diff --git a/spec/views/gardens/show.html.haml_spec.rb b/spec/views/gardens/show.html.haml_spec.rb index cd38a0ec4..fee56002f 100644 --- a/spec/views/gardens/show.html.haml_spec.rb +++ b/spec/views/gardens/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "gardens/show" do before(:each) do diff --git a/spec/views/harvests/edit.html.haml_spec.rb b/spec/views/harvests/edit.html.haml_spec.rb index e47d3ad4a..4802bab88 100644 --- a/spec/views/harvests/edit.html.haml_spec.rb +++ b/spec/views/harvests/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "harvests/edit" do before(:each) do diff --git a/spec/views/harvests/index.html.haml_spec.rb b/spec/views/harvests/index.html.haml_spec.rb index 093a383a9..9a3392155 100644 --- a/spec/views/harvests/index.html.haml_spec.rb +++ b/spec/views/harvests/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "harvests/index" do before(:each) do diff --git a/spec/views/harvests/new.html.haml_spec.rb b/spec/views/harvests/new.html.haml_spec.rb index 81de2671a..93a595188 100644 --- a/spec/views/harvests/new.html.haml_spec.rb +++ b/spec/views/harvests/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "harvests/new" do before(:each) do diff --git a/spec/views/harvests/show.html.haml_spec.rb b/spec/views/harvests/show.html.haml_spec.rb index f03706be8..4261232e9 100644 --- a/spec/views/harvests/show.html.haml_spec.rb +++ b/spec/views/harvests/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "harvests/show" do before(:each) do diff --git a/spec/views/home/_blurb.html.haml_spec.rb b/spec/views/home/_blurb.html.haml_spec.rb index 3660d0900..13b2d1b46 100644 --- a/spec/views/home/_blurb.html.haml_spec.rb +++ b/spec/views/home/_blurb.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_blurb.html.haml', :type => "view" do context 'signed out' do diff --git a/spec/views/home/_crops.html.haml_spec.rb b/spec/views/home/_crops.html.haml_spec.rb index b479f4ee4..e874bb890 100644 --- a/spec/views/home/_crops.html.haml_spec.rb +++ b/spec/views/home/_crops.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_crops.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/home/_keep_in_touch.html.haml_spec.rb b/spec/views/home/_keep_in_touch.html.haml_spec.rb index 637e0ee46..a7b19891d 100644 --- a/spec/views/home/_keep_in_touch.html.haml_spec.rb +++ b/spec/views/home/_keep_in_touch.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_keep_in_touch.html.haml', :type => "view" do before :each do diff --git a/spec/views/home/_members.html.haml_spec.rb b/spec/views/home/_members.html.haml_spec.rb index 4b527f1a8..616694ab3 100644 --- a/spec/views/home/_members.html.haml_spec.rb +++ b/spec/views/home/_members.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_members.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/home/_open.html.haml_spec.rb b/spec/views/home/_open.html.haml_spec.rb index 543db7630..49e541c3b 100644 --- a/spec/views/home/_open.html.haml_spec.rb +++ b/spec/views/home/_open.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_open.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/home/_seeds.html.haml_spec.rb b/spec/views/home/_seeds.html.haml_spec.rb index bc5f6d2fa..82efa194d 100644 --- a/spec/views/home/_seeds.html.haml_spec.rb +++ b/spec/views/home/_seeds.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_seeds.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/home/_stats.html.haml_spec.rb b/spec/views/home/_stats.html.haml_spec.rb index 0f39e9e81..46ab4a9f9 100644 --- a/spec/views/home/_stats.html.haml_spec.rb +++ b/spec/views/home/_stats.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/_stats.html.haml', :type => "view" do it 'has activity stats' do diff --git a/spec/views/home/index_spec.rb b/spec/views/home/index_spec.rb index 829c6fa36..a04377b39 100644 --- a/spec/views/home/index_spec.rb +++ b/spec/views/home/index_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'home/index.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/layouts/_footer_spec.rb b/spec/views/layouts/_footer_spec.rb index c3dc3a9b7..987fab00c 100644 --- a/spec/views/layouts/_footer_spec.rb +++ b/spec/views/layouts/_footer_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'layouts/_footer.html.haml', :type => "view" do diff --git a/spec/views/layouts/_header_spec.rb b/spec/views/layouts/_header_spec.rb index 2274b25b5..4a56133b3 100644 --- a/spec/views/layouts/_header_spec.rb +++ b/spec/views/layouts/_header_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'layouts/_header.html.haml', :type => "view" do context "when not logged in" do diff --git a/spec/views/layouts/_meta_spec.rb b/spec/views/layouts/_meta_spec.rb index a81942d0f..8419ea129 100644 --- a/spec/views/layouts/_meta_spec.rb +++ b/spec/views/layouts/_meta_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'layouts/_meta.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/layouts/application_spec.rb b/spec/views/layouts/application_spec.rb index 0c7bd8b50..56f3f26f1 100644 --- a/spec/views/layouts/application_spec.rb +++ b/spec/views/layouts/application_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'layouts/application.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/members/_location.html.haml_spec.rb b/spec/views/members/_location.html.haml_spec.rb index 96c1e3b8d..2e163b1ed 100644 --- a/spec/views/members/_location.html.haml_spec.rb +++ b/spec/views/members/_location.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "members/_location" do context "member with location" do diff --git a/spec/views/members/index.html.haml_spec.rb b/spec/views/members/index.html.haml_spec.rb index 22fd9c04f..b3a65eb76 100644 --- a/spec/views/members/index.html.haml_spec.rb +++ b/spec/views/members/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "members/index" do before(:each) do diff --git a/spec/views/members/show.rss.haml_spec.rb b/spec/views/members/show.rss.haml_spec.rb index df436b8af..98a8f217a 100644 --- a/spec/views/members/show.rss.haml_spec.rb +++ b/spec/views/members/show.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'members/show.rss.haml', :type => "view" do before(:each) do diff --git a/spec/views/notifications/index.html.haml_spec.rb b/spec/views/notifications/index.html.haml_spec.rb index 351bbb44f..ed62d3d7a 100644 --- a/spec/views/notifications/index.html.haml_spec.rb +++ b/spec/views/notifications/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "notifications/index" do before(:each) do diff --git a/spec/views/notifications/new.html.haml_spec.rb b/spec/views/notifications/new.html.haml_spec.rb index d96358da8..15dacb730 100644 --- a/spec/views/notifications/new.html.haml_spec.rb +++ b/spec/views/notifications/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "notifications/new" do before(:each) do diff --git a/spec/views/notifications/show.html.haml_spec.rb b/spec/views/notifications/show.html.haml_spec.rb index 3028e8f0e..9d51cb5c2 100644 --- a/spec/views/notifications/show.html.haml_spec.rb +++ b/spec/views/notifications/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "notifications/show" do before(:each) do diff --git a/spec/views/notifier/notify.html.haml_spec.rb b/spec/views/notifier/notify.html.haml_spec.rb index 687e702cc..d027b9d0c 100644 --- a/spec/views/notifier/notify.html.haml_spec.rb +++ b/spec/views/notifier/notify.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'notifier/notify.html.haml', :type => "view" do diff --git a/spec/views/orders/index.html.haml_spec.rb b/spec/views/orders/index.html.haml_spec.rb index 2eb399abd..a0d558487 100644 --- a/spec/views/orders/index.html.haml_spec.rb +++ b/spec/views/orders/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "orders/index" do before(:each) do diff --git a/spec/views/orders/show.html.haml_spec.rb b/spec/views/orders/show.html.haml_spec.rb index 9621de369..b6b60ec06 100644 --- a/spec/views/orders/show.html.haml_spec.rb +++ b/spec/views/orders/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "orders/show" do diff --git a/spec/views/photos/edit.html.haml_spec.rb b/spec/views/photos/edit.html.haml_spec.rb index 3b8cde557..f3a9a0ed7 100644 --- a/spec/views/photos/edit.html.haml_spec.rb +++ b/spec/views/photos/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "photos/edit" do before(:each) do diff --git a/spec/views/photos/index.html.haml_spec.rb b/spec/views/photos/index.html.haml_spec.rb index bf4699c48..5daaa1eda 100644 --- a/spec/views/photos/index.html.haml_spec.rb +++ b/spec/views/photos/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "photos/index" do before(:each) do diff --git a/spec/views/photos/new.html.haml_spec.rb b/spec/views/photos/new.html.haml_spec.rb index c3e47a6b8..8f0f241e3 100644 --- a/spec/views/photos/new.html.haml_spec.rb +++ b/spec/views/photos/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "photos/new" do before(:each) do diff --git a/spec/views/photos/show.html.haml_spec.rb b/spec/views/photos/show.html.haml_spec.rb index 18a201590..a523965fe 100644 --- a/spec/views/photos/show.html.haml_spec.rb +++ b/spec/views/photos/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "photos/show" do before(:each) do diff --git a/spec/views/places/_map_attribution.html.haml_spec.rb b/spec/views/places/_map_attribution.html.haml_spec.rb index e3197dfba..d85875376 100644 --- a/spec/views/places/_map_attribution.html.haml_spec.rb +++ b/spec/views/places/_map_attribution.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "places/_map_attribution.html.haml", :type => :view do before(:each) do diff --git a/spec/views/places/index.html.haml_spec.rb b/spec/views/places/index.html.haml_spec.rb index 0e4af0bb1..f3a3661ae 100644 --- a/spec/views/places/index.html.haml_spec.rb +++ b/spec/views/places/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "places/index" do before(:each) do diff --git a/spec/views/places/show.html.haml_spec.rb b/spec/views/places/show.html.haml_spec.rb index 987212740..f19d6a0f2 100644 --- a/spec/views/places/show.html.haml_spec.rb +++ b/spec/views/places/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "places/show" do before(:each) do diff --git a/spec/views/plant_parts/edit.html.haml_spec.rb b/spec/views/plant_parts/edit.html.haml_spec.rb index 2011b34c3..6193ef1b0 100644 --- a/spec/views/plant_parts/edit.html.haml_spec.rb +++ b/spec/views/plant_parts/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plant_parts/edit" do before(:each) do diff --git a/spec/views/plant_parts/index.html.haml_spec.rb b/spec/views/plant_parts/index.html.haml_spec.rb index 6d1020717..b68736977 100644 --- a/spec/views/plant_parts/index.html.haml_spec.rb +++ b/spec/views/plant_parts/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plant_parts/index" do before(:each) do diff --git a/spec/views/plant_parts/new.html.haml_spec.rb b/spec/views/plant_parts/new.html.haml_spec.rb index 6a415fd4e..d512ecee1 100644 --- a/spec/views/plant_parts/new.html.haml_spec.rb +++ b/spec/views/plant_parts/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plant_parts/new" do before(:each) do diff --git a/spec/views/plant_parts/show.html.haml_spec.rb b/spec/views/plant_parts/show.html.haml_spec.rb index 40392a65d..33390171c 100644 --- a/spec/views/plant_parts/show.html.haml_spec.rb +++ b/spec/views/plant_parts/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plant_parts/show" do before(:each) do diff --git a/spec/views/plantings/_form.html.haml_spec.rb b/spec/views/plantings/_form.html.haml_spec.rb index 69da79c35..88b12bd9e 100644 --- a/spec/views/plantings/_form.html.haml_spec.rb +++ b/spec/views/plantings/_form.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/_form" do before(:each) do diff --git a/spec/views/plantings/_thumbnail.html.haml_spec.rb b/spec/views/plantings/_thumbnail.html.haml_spec.rb index ac1ffaa78..47501b1fd 100644 --- a/spec/views/plantings/_thumbnail.html.haml_spec.rb +++ b/spec/views/plantings/_thumbnail.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/_thumbnail" do before(:each) do diff --git a/spec/views/plantings/edit.html.haml_spec.rb b/spec/views/plantings/edit.html.haml_spec.rb index f80f6a0b4..6ec152b9b 100644 --- a/spec/views/plantings/edit.html.haml_spec.rb +++ b/spec/views/plantings/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/edit" do before(:each) do diff --git a/spec/views/plantings/index.html.haml_spec.rb b/spec/views/plantings/index.html.haml_spec.rb index f80331117..c51c378a0 100644 --- a/spec/views/plantings/index.html.haml_spec.rb +++ b/spec/views/plantings/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/index" do before(:each) do diff --git a/spec/views/plantings/index.rss.haml_spec.rb b/spec/views/plantings/index.rss.haml_spec.rb index 5a7cb48c5..e7e232ebf 100644 --- a/spec/views/plantings/index.rss.haml_spec.rb +++ b/spec/views/plantings/index.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'plantings/index.rss.haml' do before(:each) do diff --git a/spec/views/plantings/new.html.haml_spec.rb b/spec/views/plantings/new.html.haml_spec.rb index 61e81eb20..0b05b5532 100644 --- a/spec/views/plantings/new.html.haml_spec.rb +++ b/spec/views/plantings/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/new" do before(:each) do diff --git a/spec/views/plantings/show.html.haml_spec.rb b/spec/views/plantings/show.html.haml_spec.rb index 018e5074b..c90220b38 100644 --- a/spec/views/plantings/show.html.haml_spec.rb +++ b/spec/views/plantings/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "plantings/show" do def create_planting_for(member) diff --git a/spec/views/policy/community_spec.rb b/spec/views/policy/community_spec.rb index 70608e463..f4b9c6429 100644 --- a/spec/views/policy/community_spec.rb +++ b/spec/views/policy/community_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'policy/community.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/policy/tos_spec.rb b/spec/views/policy/tos_spec.rb index 548deadc3..2a11532a8 100644 --- a/spec/views/policy/tos_spec.rb +++ b/spec/views/policy/tos_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'policy/tos.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/posts/_single.html.haml_spec.rb b/spec/views/posts/_single.html.haml_spec.rb index eebac11f4..50216c4db 100644 --- a/spec/views/posts/_single.html.haml_spec.rb +++ b/spec/views/posts/_single.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "posts/_single" do diff --git a/spec/views/posts/edit.html.haml_spec.rb b/spec/views/posts/edit.html.haml_spec.rb index 91e2d9b4f..7c68fc4ae 100644 --- a/spec/views/posts/edit.html.haml_spec.rb +++ b/spec/views/posts/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "posts/edit" do before(:each) do diff --git a/spec/views/posts/index.html.haml_spec.rb b/spec/views/posts/index.html.haml_spec.rb index 3b7b02611..d5d49951a 100644 --- a/spec/views/posts/index.html.haml_spec.rb +++ b/spec/views/posts/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "posts/index" do before(:each) do diff --git a/spec/views/posts/index.rss.haml_spec.rb b/spec/views/posts/index.rss.haml_spec.rb index b28deb2db..c06416386 100644 --- a/spec/views/posts/index.rss.haml_spec.rb +++ b/spec/views/posts/index.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'posts/index.rss.haml', :type => "view" do before(:each) do diff --git a/spec/views/posts/new.html.haml_spec.rb b/spec/views/posts/new.html.haml_spec.rb index be69c972c..ca4ee0a48 100644 --- a/spec/views/posts/new.html.haml_spec.rb +++ b/spec/views/posts/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "posts/new" do before(:each) do diff --git a/spec/views/posts/show.html.haml_spec.rb b/spec/views/posts/show.html.haml_spec.rb index d9682b015..c0d1a82d0 100644 --- a/spec/views/posts/show.html.haml_spec.rb +++ b/spec/views/posts/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "posts/show" do before(:each) do diff --git a/spec/views/posts/show.rss.haml_spec.rb b/spec/views/posts/show.rss.haml_spec.rb index 2f2780d09..072b8032c 100644 --- a/spec/views/posts/show.rss.haml_spec.rb +++ b/spec/views/posts/show.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'posts/show.rss.haml' do before(:each) do diff --git a/spec/views/products/edit.html.haml_spec.rb b/spec/views/products/edit.html.haml_spec.rb index 875fab4b2..3505c0216 100644 --- a/spec/views/products/edit.html.haml_spec.rb +++ b/spec/views/products/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "products/edit" do before(:each) do diff --git a/spec/views/products/index.html.haml_spec.rb b/spec/views/products/index.html.haml_spec.rb index 0e18b8ddc..2b96540c1 100644 --- a/spec/views/products/index.html.haml_spec.rb +++ b/spec/views/products/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "products/index" do before(:each) do diff --git a/spec/views/products/new.html.haml_spec.rb b/spec/views/products/new.html.haml_spec.rb index 769fbe6bd..ab7bc5f7e 100644 --- a/spec/views/products/new.html.haml_spec.rb +++ b/spec/views/products/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "products/new" do before(:each) do diff --git a/spec/views/products/show.html.haml_spec.rb b/spec/views/products/show.html.haml_spec.rb index 12710a91f..be9d78dbd 100644 --- a/spec/views/products/show.html.haml_spec.rb +++ b/spec/views/products/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "products/show" do before(:each) do diff --git a/spec/views/roles/edit.html.haml_spec.rb b/spec/views/roles/edit.html.haml_spec.rb index 2e2f66c7b..2b12e05d5 100644 --- a/spec/views/roles/edit.html.haml_spec.rb +++ b/spec/views/roles/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "roles/edit" do before(:each) do diff --git a/spec/views/roles/index.html.haml_spec.rb b/spec/views/roles/index.html.haml_spec.rb index 3c62e0986..1b732c381 100644 --- a/spec/views/roles/index.html.haml_spec.rb +++ b/spec/views/roles/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "roles/index" do before(:each) do diff --git a/spec/views/roles/new.html.haml_spec.rb b/spec/views/roles/new.html.haml_spec.rb index e15e14226..bba7e62b7 100644 --- a/spec/views/roles/new.html.haml_spec.rb +++ b/spec/views/roles/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "roles/new" do before(:each) do diff --git a/spec/views/roles/show.html.haml_spec.rb b/spec/views/roles/show.html.haml_spec.rb index 389a5c8c3..16f48415f 100644 --- a/spec/views/roles/show.html.haml_spec.rb +++ b/spec/views/roles/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "roles/show" do before(:each) do diff --git a/spec/views/scientific_names/edit.html.haml_spec.rb b/spec/views/scientific_names/edit.html.haml_spec.rb index 1b48c51cd..0202243f8 100644 --- a/spec/views/scientific_names/edit.html.haml_spec.rb +++ b/spec/views/scientific_names/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "scientific_names/edit" do context "logged in" do diff --git a/spec/views/scientific_names/index.html.haml_spec.rb b/spec/views/scientific_names/index.html.haml_spec.rb index fff8874f5..9e5a8519e 100644 --- a/spec/views/scientific_names/index.html.haml_spec.rb +++ b/spec/views/scientific_names/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "scientific_names/index" do before(:each) do diff --git a/spec/views/scientific_names/new.html.haml_spec.rb b/spec/views/scientific_names/new.html.haml_spec.rb index 9c892f5ef..151908e7d 100644 --- a/spec/views/scientific_names/new.html.haml_spec.rb +++ b/spec/views/scientific_names/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "scientific_names/new" do before(:each) do diff --git a/spec/views/scientific_names/show.html.haml_spec.rb b/spec/views/scientific_names/show.html.haml_spec.rb index 6fbb95e42..d2927c5a9 100644 --- a/spec/views/scientific_names/show.html.haml_spec.rb +++ b/spec/views/scientific_names/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "scientific_names/show" do before(:each) do diff --git a/spec/views/seeds/edit.html.haml_spec.rb b/spec/views/seeds/edit.html.haml_spec.rb index 03b2064cf..6a0235e4b 100644 --- a/spec/views/seeds/edit.html.haml_spec.rb +++ b/spec/views/seeds/edit.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "seeds/edit" do before(:each) do diff --git a/spec/views/seeds/index.html.haml_spec.rb b/spec/views/seeds/index.html.haml_spec.rb index 036c4aa04..ae6f78047 100644 --- a/spec/views/seeds/index.html.haml_spec.rb +++ b/spec/views/seeds/index.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "seeds/index" do before(:each) do diff --git a/spec/views/seeds/index.rss.haml_spec.rb b/spec/views/seeds/index.rss.haml_spec.rb index 0b30d19a5..22e10f1e7 100644 --- a/spec/views/seeds/index.rss.haml_spec.rb +++ b/spec/views/seeds/index.rss.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'seeds/index.rss.haml' do before(:each) do diff --git a/spec/views/seeds/new.html.haml_spec.rb b/spec/views/seeds/new.html.haml_spec.rb index a88713181..3121f7b3b 100644 --- a/spec/views/seeds/new.html.haml_spec.rb +++ b/spec/views/seeds/new.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "seeds/new" do before(:each) do diff --git a/spec/views/seeds/show.html.haml_spec.rb b/spec/views/seeds/show.html.haml_spec.rb index 737cf0232..b2276ba23 100644 --- a/spec/views/seeds/show.html.haml_spec.rb +++ b/spec/views/seeds/show.html.haml_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe "seeds/show" do before(:each) do diff --git a/spec/views/shop/index_spec.rb b/spec/views/shop/index_spec.rb index 49034368d..f93d173cd 100644 --- a/spec/views/shop/index_spec.rb +++ b/spec/views/shop/index_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'shop/index.html.haml', :type => "view" do before(:each) do diff --git a/spec/views/support/index_spec.rb b/spec/views/support/index_spec.rb index 0c7491ed7..1b29e2adb 100644 --- a/spec/views/support/index_spec.rb +++ b/spec/views/support/index_spec.rb @@ -1,4 +1,4 @@ -require 'spec_helper' +require 'rails_helper' describe 'support/index.html.haml', :type => "view" do before(:each) do