spec/spec_helper.rb in activity_notification-1.3.0 vs spec/spec_helper.rb in activity_notification-1.4.0

- old
+ new

@@ -38,14 +38,19 @@ require 'activity_notification' # For active record ORM require 'active_record' +def clear_database + [ActivityNotification::Notification, ActivityNotification::Subscription, Comment, Article, Admin, User].each do |model_class| + model_class.delete_all + end +end + RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods config.before(:all) do FactoryGirl.reload - ActivityNotification::Notification.delete_all - ActivityNotification::Subscription.delete_all + clear_database end config.include Devise::Test::ControllerHelpers, type: :controller end \ No newline at end of file