Sha256: e7ca948274e983f38119b8cc2613fa73db9fe48d27ba04e306fa1272d53216e7
Contents?: true
Size: 1.76 KB
Versions: 3
Compression:
Stored size: 1.76 KB
Contents
require 'simplecov' require 'simplecov-rcov' SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter SimpleCov.start do minimum_coverage 80 add_filter "/spec/" add_filter "/config/" end ENV['RAILS_ENV'] ||= 'test' require File.expand_path("../test_app/config/environment", __FILE__) require File.expand_path("../../lib/notifiable", __FILE__) require File.expand_path("../../app/controllers/notifiable/device_tokens_controller", __FILE__) require 'database_cleaner' require 'rspec/rails' require 'factory_girl_rails' Rails.backtrace_cleaner.remove_silencers! Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } DatabaseCleaner.strategy = :truncation ActiveRecord::Migrator.migrate(File.join(Rails.root, 'db/migrate')) RSpec.configure do |config| config.mock_with :rspec config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false config.order = "random" # For testing engines config.include EngineControllerTestMonkeyPatch, :type => :controller # JsonHelpers for controllers config.include Requests::JsonHelpers, :type => :controller # Remove need for factory girl prefix config.include FactoryGirl::Syntax::Methods # errors for deprecations #config.raise_errors_for_deprecations! # Infer the spec type from the containing folder config.infer_spec_type_from_file_location! config.before(:suite) do #FactoryGirl.lint end config.before(:each) { DatabaseCleaner.start Notifiable.delivery_method = :send } config.after(:each) { DatabaseCleaner.clean } end class MockNotifier < Notifiable::NotifierBase def enqueue(device_token, localized_notification) processed(device_token, 0) end end Notifiable.notifier_classes[:mock] = MockNotifier
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
notifiable-rails-0.21.3 | spec/spec_helper.rb |
notifiable-rails-0.21.2 | spec/spec_helper.rb |
notifiable-rails-0.21.1 | spec/spec_helper.rb |