Sha256: a5ceab644e60a77486a40964e3b399392097342c8ae14f0086c1d15b7a0d2bd0
Contents?: true
Size: 1.3 KB
Versions: 6
Compression:
Stored size: 1.3 KB
Contents
ENV["RAILS_ENV"] ||= "test" require 'bundler/setup' Bundler.setup require 'simplecov' require 'coveralls' require 'rails' Coveralls.wear! SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start('rails') do add_filter '/spec/' add_filter '/lib/generators/templates/' add_filter '/lib/activity_notification/version.rb' if Rails::VERSION::MAJOR == 5 nocov_token 'skip-rails5' elsif Rails::VERSION::MAJOR == 4 nocov_token 'skip-rails4' end if ENV['AN_ORM'] == 'mongoid' add_filter '/lib/activity_notification/orm/active_record' else add_filter '/lib/activity_notification/orm/mongoid' end end # Testing with Devise require 'devise' # Dummy application require 'rails_app/config/environment' require 'rspec/rails' require 'ammeter/init' require 'factory_bot_rails' require 'activity_notification' 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 FactoryBot::Syntax::Methods config.before(:all) do FactoryBot.reload clear_database end config.include Devise::Test::ControllerHelpers, type: :controller end
Version data entries
6 entries across 6 versions & 1 rubygems