repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/spec_helper.rb
spec/spec_helper.rb
ENV['RAILS_ENV'] = 'test' def client (ENV['CLIENT'] || :active_record).to_sym end if !ENV['CI'] || (ENV['CI'] && ENV['QUALITY'] == 'true') begin require './spec/support/simplecov_helper' include SimpleCovHelper start_simple_cov("rpush-#{client}-#{RUBY_VERSION}") rescue LoadError puts "Coverage di...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/support/simplecov_quality_formatter.rb
spec/support/simplecov_quality_formatter.rb
module SimpleCov module Formatter class QualityFormatter def format(result) SimpleCov::Formatter::HTMLFormatter.new.format(result) File.open("coverage/covered_percent", "w") do |f| f.puts result.source_files.covered_percent.to_f end end end end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/support/simplecov_helper.rb
spec/support/simplecov_helper.rb
require 'simplecov' require './spec/support/simplecov_quality_formatter' module SimpleCovHelper def start_simple_cov(name) SimpleCov.start do add_filter '/spec/' add_filter '/lib/generators' command_name name formatters = [SimpleCov::Formatter::QualityFormatter] if ENV['CI'] ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/support/active_record_setup.rb
spec/support/active_record_setup.rb
require 'active_record' jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' SPEC_ADAPTER = ENV['ADAPTER'] || 'postgresql' SPEC_ADAPTER = 'jdbc' + SPEC_ADAPTER if jruby require 'yaml' db_config_path = File.expand_path("config/database.yml", File.dirname(__FILE__)) db_config = YAML.load(ERB.new(File.read(db_config...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/embed_spec.rb
spec/unit/embed_spec.rb
require 'unit_spec_helper' describe Rpush, 'embed' do before do allow(Rpush::Daemon).to receive_messages(start: nil, shutdown: nil) allow(Kernel).to receive(:at_exit) end after { Rpush.shutdown } it 'sets the embedded config option to true' do Rpush.embed expect(Rpush.config.embedded).to eq(t...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/configuration_spec.rb
spec/unit/configuration_spec.rb
require 'unit_spec_helper' describe Rpush do let(:config) { Rpush.config } before do allow(Rpush).to receive_messages(require: nil) allow(Rpush).to receive_messages(config: config) end it 'yields a configure block' do expect { |b| Rpush.configure(&b) }.to yield_with_args(config) end end descri...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon_spec.rb
spec/unit/daemon_spec.rb
require 'unit_spec_helper' require 'rpush/daemon/store/active_record' describe Rpush::Daemon, "when starting" do module Rails; end let(:certificate) { double } let(:password) { double } let(:logger) { double(:logger, info: nil, error: nil, warn: nil, internal_logger: nil) } before do allow(Rpush).to re...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/reflection_collection_spec.rb
spec/unit/reflection_collection_spec.rb
require 'unit_spec_helper' describe Rpush do it 'yields reflections for configuration' do did_yield = false Rpush.reflect { did_yield = true } expect(did_yield).to eq(true) end end describe Rpush::ReflectionCollection do it 'dispatches the given reflection' do did_yield = false R...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/reflectable_spec.rb
spec/unit/reflectable_spec.rb
require 'unit_spec_helper' describe Rpush::Reflectable do class TestReflectable include Rpush::Reflectable end let(:logger) { double(error: nil) } let(:test_reflectable) { TestReflectable.new } before do allow(Rpush.reflection_stack[0]).to receive(:__dispatch) allow(Rpush).to receive_messages(l...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/deprecatable_spec.rb
spec/unit/deprecatable_spec.rb
require 'unit_spec_helper' describe Rpush::Deprecatable do class HasDeprecatedMethod include Rpush::Deprecatable def original_called? @called == true end def deprecated_method @called = true end deprecated(:deprecated_method, '4.0') end let(:klass) { HasDeprecatedMethod.new...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/push_spec.rb
spec/unit/push_spec.rb
require 'unit_spec_helper' describe Rpush, 'push' do before do allow(Rpush::Daemon::Synchronizer).to receive_messages(sync: nil) allow(Rpush::Daemon::AppRunner).to receive_messages(wait: nil) allow(Rpush::Daemon::Feeder).to receive_messages(start: nil) end it 'sets the push config option to true' do...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/logger_spec.rb
spec/unit/logger_spec.rb
require "unit_spec_helper" module Rails attr_accessor :logger end describe Rpush::Logger do let(:log) { double(:sync= => true, :level= => nil) } before do @logger_class = defined?(ActiveSupport::BufferedLogger) ? ActiveSupport::BufferedLogger : ActiveSupport::Logger @logger = double(@logger_class.name,...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/deprecation_spec.rb
spec/unit/deprecation_spec.rb
require 'unit_spec_helper' describe Rpush::Deprecation do it 'prints a warning' do expect(STDERR).to receive(:puts).with("DEPRECATION WARNING: msg") Rpush::Deprecation.warn("msg") end it 'does not print a warning when muted' do expect(STDERR).not_to receive(:puts) Rpush::Deprecation.muted do ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/plugin_spec.rb
spec/unit/plugin_spec.rb
require 'unit_spec_helper' describe Rpush::Plugin do include Rpush::Reflectable it 'can only be initialized once' do plugin = double(Rpush::Plugin, unload: nil) expect(Rpush::Plugin).to receive(:new).once.and_return(plugin) Rpush.plugin(:test) Rpush.plugin(:test) end it 'can be referenced' do...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/rpush_spec.rb
spec/unit/rpush_spec.rb
require 'unit_spec_helper' describe Rpush do it "lazy initializes the logger" do expect(Rpush::Logger).to receive(:new) Rpush.logger end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/app_spec.rb
spec/unit/client/redis/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::App do it_behaves_like 'Rpush::Client::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/notification_spec.rb
spec/unit/client/redis/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Notification do it_behaves_like 'Rpush::Client::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/webpush/app_spec.rb
spec/unit/client/redis/webpush/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Webpush::App do it_behaves_like 'Rpush::Client::Webpush::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/webpush/notification_spec.rb
spec/unit/client/redis/webpush/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Webpush::Notification do it_behaves_like 'Rpush::Client::Webpush::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/wns/raw_notification_spec.rb
spec/unit/client/redis/wns/raw_notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Wns::RawNotification do it_behaves_like 'Rpush::Client::Wns::RawNotification' subject(:notification) do notif = described_class.new notif.app = Rpush::Wns::App.create!(name: "MyApp", client_id: "someclient", client_secret: "somesecret") notif.u...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/wns/badge_notification_spec.rb
spec/unit/client/redis/wns/badge_notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Wns::BadgeNotification do it_behaves_like 'Rpush::Client::Wns::BadgeNotification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apns2/app_spec.rb
spec/unit/client/redis/apns2/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Apns2::App do end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apns2/notification_spec.rb
spec/unit/client/redis/apns2/notification_spec.rb
# encoding: US-ASCII require "unit_spec_helper" describe Rpush::Client::Redis::Apns2::Notification do it_behaves_like 'Rpush::Client::Apns::Notification' it "should validate the length of the binary conversion of the notification" do notification = described_class.new notification.app = Rpush::Apns2::App...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apns/feedback_spec.rb
spec/unit/client/redis/apns/feedback_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Apns::Feedback do it_behaves_like 'Rpush::Client::Apns::Feedback' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apns/app_spec.rb
spec/unit/client/redis/apns/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Apns::App do it_behaves_like 'Rpush::Client::Apns::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apns/notification_spec.rb
spec/unit/client/redis/apns/notification_spec.rb
# encoding: US-ASCII require "unit_spec_helper" describe Rpush::Client::Redis::Apns::Notification do it_behaves_like 'Rpush::Client::Apns::Notification' it "should validate the length of the binary conversion of the notification" do notification = described_class.new notification.app = Rpush::Apns2::App....
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/fcm/app_spec.rb
spec/unit/client/redis/fcm/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Fcm::App do it_behaves_like 'Rpush::Client::Fcm::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/fcm/notification_spec.rb
spec/unit/client/redis/fcm/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Fcm::Notification do it_behaves_like 'Rpush::Client::Fcm::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/pushy/app_spec.rb
spec/unit/client/redis/pushy/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Pushy::App do it_behaves_like 'Rpush::Client::Pushy::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/pushy/notification_spec.rb
spec/unit/client/redis/pushy/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Pushy::Notification do it_behaves_like 'Rpush::Client::Pushy::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/apnsp8/notification_spec.rb
spec/unit/client/redis/apnsp8/notification_spec.rb
require "unit_spec_helper" describe Rpush::Client::Redis::Apnsp8::Notification do after do Rpush::Apnsp8::App.all.select { |a| a.environment == "development" && a.apn_key == "1" }.each(&:destroy) end it_behaves_like "Rpush::Client::Apns::Notification" it "should validate the length of the binary conversi...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/wpns/app_spec.rb
spec/unit/client/redis/wpns/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Wpns::App do it_behaves_like 'Rpush::Client::Wpns::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/wpns/notification_spec.rb
spec/unit/client/redis/wpns/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Wpns::Notification do it_behaves_like 'Rpush::Client::Wpns::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/adm/app_spec.rb
spec/unit/client/redis/adm/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Adm::App do it_behaves_like 'Rpush::Client::Adm::App' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/redis/adm/notification_spec.rb
spec/unit/client/redis/adm/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::Redis::Adm::Notification do it_behaves_like 'Rpush::Client::Adm::Notification' end if redis?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/app_spec.rb
spec/unit/client/active_record/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::App do it_behaves_like 'Rpush::Client::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/notification_spec.rb
spec/unit/client/active_record/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Notification do it_behaves_like 'Rpush::Client::Notification' subject(:notification) { described_class.new } it 'saves its parent App if required' do notification.app = Rpush::App.new(name: "aname") expect(notification.app).to be_valid ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/webpush/app_spec.rb
spec/unit/client/active_record/webpush/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Webpush::App do it_behaves_like 'Rpush::Client::Webpush::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/webpush/notification_spec.rb
spec/unit/client/active_record/webpush/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Webpush::Notification do it_behaves_like 'Rpush::Client::Webpush::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/wns/raw_notification_spec.rb
spec/unit/client/active_record/wns/raw_notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Wns::RawNotification do it_behaves_like 'Rpush::Client::Wns::RawNotification' let(:notification) do notif = described_class.new notif.app = Rpush::Wns::App.create!(name: "MyApp", client_id: "someclient", client_secret: "somesecret") noti...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/wns/badge_notification_spec.rb
spec/unit/client/active_record/wns/badge_notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Wns::BadgeNotification do it_behaves_like 'Rpush::Client::Wns::BadgeNotification' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apns2/app_spec.rb
spec/unit/client/active_record/apns2/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Apns2::App do it_behaves_like 'Rpush::Client::Apns::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apns2/notification_spec.rb
spec/unit/client/active_record/apns2/notification_spec.rb
require "unit_spec_helper" describe Rpush::Client::ActiveRecord::Apns2::Notification do subject(:notification) { described_class.new } it_behaves_like 'Rpush::Client::Apns::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' it "should validate the length of the binary conversion of the...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apns/feedback_spec.rb
spec/unit/client/active_record/apns/feedback_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Apns::Feedback do it_behaves_like 'Rpush::Client::Apns::Feedback' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apns/app_spec.rb
spec/unit/client/active_record/apns/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Apns::App do it_behaves_like 'Rpush::Client::Apns::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apns/notification_spec.rb
spec/unit/client/active_record/apns/notification_spec.rb
require "unit_spec_helper" describe Rpush::Client::ActiveRecord::Apns::Notification do subject(:notification) { described_class.new } it_behaves_like 'Rpush::Client::Apns::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' it "should validate the length of the binary conversion of the ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/fcm/app_spec.rb
spec/unit/client/active_record/fcm/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Fcm::App do it_behaves_like 'Rpush::Client::Fcm::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/fcm/notification_spec.rb
spec/unit/client/active_record/fcm/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Fcm::Notification do it_behaves_like 'Rpush::Client::Fcm::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' subject(:notification) { described_class.new } let(:app) { Rpush::Fcm::App.create!(name: 'test', auth_key: 'abc')...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/pushy/app_spec.rb
spec/unit/client/active_record/pushy/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Pushy::App do it_behaves_like 'Rpush::Client::Pushy::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/pushy/notification_spec.rb
spec/unit/client/active_record/pushy/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Pushy::Notification do it_behaves_like 'Rpush::Client::Pushy::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/apnsp8/notification_spec.rb
spec/unit/client/active_record/apnsp8/notification_spec.rb
require "unit_spec_helper" describe Rpush::Client::ActiveRecord::Apnsp8::Notification do subject(:notification) { described_class.new } it_behaves_like 'Rpush::Client::Apns::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' it "should validate the length of the binary conversion of th...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/wpns/app_spec.rb
spec/unit/client/active_record/wpns/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Wpns::App do it_behaves_like 'Rpush::Client::Wpns::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/wpns/notification_spec.rb
spec/unit/client/active_record/wpns/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Wpns::Notification do it_behaves_like 'Rpush::Client::Wpns::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/shared/app.rb
spec/unit/client/active_record/shared/app.rb
shared_examples_for 'Rpush::Client::ActiveRecord::App' do it 'validates the uniqueness of name within type and environment' do Rpush::Apns::App.create!(name: 'test', environment: 'production', certificate: TEST_CERT) app = Rpush::Apns::App.new(name: 'test', environment: 'production', certificate: TEST_CERT) ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/shared/notification.rb
spec/unit/client/active_record/shared/notification.rb
shared_examples_for 'Rpush::Client::ActiveRecord::Notification' do let(:notification) { described_class.new } it 'allows assignment of a single registration ID' do notification.registration_ids = 'a' expect(notification.registration_ids).to eq ['a'] end describe 'when assigning data for the device' do...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/adm/app_spec.rb
spec/unit/client/active_record/adm/app_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Adm::App do it_behaves_like 'Rpush::Client::Adm::App' it_behaves_like 'Rpush::Client::ActiveRecord::App' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/active_record/adm/notification_spec.rb
spec/unit/client/active_record/adm/notification_spec.rb
require 'unit_spec_helper' describe Rpush::Client::ActiveRecord::Adm::Notification do it_behaves_like 'Rpush::Client::Adm::Notification' it_behaves_like 'Rpush::Client::ActiveRecord::Notification' end if active_record?
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/app.rb
spec/unit/client/shared/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::App' do context 'validating certificates' do it 'rescues from certificate error' do app = Rpush::Apns::App.new(name: 'test', environment: 'development', certificate: 'bad') expect { app.valid? }.not_to raise_error expect(app.valid?).to ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/notification.rb
spec/unit/client/shared/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Notification' do let(:notification) { described_class.new } it 'allows assignment of many registration IDs' do notification.registration_ids = %w[a b] expect(notification.registration_ids).to eq %w[a b] end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/webpush/app.rb
spec/unit/client/shared/webpush/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Webpush::App' do describe 'validates' do subject { described_class.new } it 'validates presence of name' do is_expected.not_to be_valid expect(subject.errors[:name]).to eq ["can't be blank"] end it 'validates presence of vapid_k...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/webpush/notification.rb
spec/unit/client/shared/webpush/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Webpush::Notification' do subject(:notification) { described_class.new } describe 'notification attributes' do describe 'data' do subject { described_class.new(data: { message: 'test', urgency: 'normal' } ) } it 'has a message' do ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/wns/raw_notification.rb
spec/unit/client/shared/wns/raw_notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Wns::RawNotification' do let(:notification) do notif = described_class.new notif.app = Rpush::Wns::App.create!(name: "MyApp", client_id: "someclient", client_secret: "somesecret") notif.uri = 'https://db5.notify.windows.com/?token=TOKEN' no...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/wns/badge_notification.rb
spec/unit/client/shared/wns/badge_notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Wns::BadgeNotification' do let(:notification) do notif = described_class.new notif.app = Rpush::Wns::App.create!(name: "MyApp", client_id: "someclient", client_secret: "somesecret") notif.uri = 'https://db5.notify.windows.com/?token=TOKEN' ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/apns/feedback.rb
spec/unit/client/shared/apns/feedback.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Apns::Feedback' do it 'validates the format of the device_token' do notification = described_class.new(device_token: "{$%^&*()}") expect(notification.valid?).to be_falsey expect(notification.errors[:device_token]).to include('is invalid') end e...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/apns/app.rb
spec/unit/client/shared/apns/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Apns::App' do it 'does not validate an app with an invalid certificate' do app = described_class.new(name: 'test', environment: 'development', certificate: 'foo') app.valid? expect(app.errors[:certificate]).to eq ['value must contain a certificat...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/apns/notification.rb
spec/unit/client/shared/apns/notification.rb
# encoding: US-ASCII require "unit_spec_helper" shared_examples 'Rpush::Client::Apns::Notification' do let(:notification) { described_class.new } let(:app) { Rpush::Apns::App.create!(name: 'my_app', environment: 'development', certificate: TEST_CERT) } it "should validate the format of the device_token" do ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/fcm/app.rb
spec/unit/client/shared/fcm/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Fcm::App' do end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/fcm/notification.rb
spec/unit/client/shared/fcm/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Fcm::Notification' do let(:app) { Rpush::Fcm::App.create!(name: 'test', auth_key: 'abc') } let(:notification) { described_class.new } it "has a 'data' payload limit of 4096 bytes" do notification.app = app notification.device_token = "valid" ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/pushy/app.rb
spec/unit/client/shared/pushy/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Pushy::App' do describe 'validates' do subject { described_class.new } it 'validates presence of name' do is_expected.not_to be_valid expect(subject.errors[:name]).to eq ["can't be blank"] end it 'validates presence of api_key' ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/pushy/notification.rb
spec/unit/client/shared/pushy/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Pushy::Notification' do subject(:notification) { described_class.new } describe 'validates' do let(:app) { Rpush::Pushy::App.create!(name: 'MyApp', api_key: 'my_api_key') } describe 'data' do subject { described_class.new(app: app, registra...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/wpns/app.rb
spec/unit/client/shared/wpns/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Wpns::App' do end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/wpns/notification.rb
spec/unit/client/shared/wpns/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Wpns::Notification' do let(:app) { Rpush::Wpns::App.create!(name: 'test', auth_key: 'abc') } let(:notification) { described_class.new } it "should have an url in the uri parameter" do notification = described_class.new(uri: "somthing") notificat...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/adm/app.rb
spec/unit/client/shared/adm/app.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Adm::App' do subject { described_class.new(name: 'test', environment: 'development', client_id: 'CLIENT_ID', client_secret: 'CLIENT_SECRET') } it 'should be valid if properly instantiated' do expect(subject).to be_valid end it 'should be invalid ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/client/shared/adm/notification.rb
spec/unit/client/shared/adm/notification.rb
require 'unit_spec_helper' shared_examples 'Rpush::Client::Adm::Notification' do let(:app) { Rpush::Adm::App.create!(name: 'test', client_id: 'CLIENT_ID', client_secret: 'CLIENT_SECRET') } let(:notification) { described_class.new } it "has a 'data' payload limit of 6144 bytes" do notification.data = { key: ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/service_config_methods_spec.rb
spec/unit/daemon/service_config_methods_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::ServiceConfigMethods do module ServiceConfigMethodsSpec extend Rpush::Daemon::ServiceConfigMethods class Delivery; end end it 'returns the delivery class' do expect(ServiceConfigMethodsSpec.delivery_class).to eq ServiceConfigMethodsSpec::Delivery ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/retryable_error_spec.rb
spec/unit/daemon/retryable_error_spec.rb
require "unit_spec_helper" describe Rpush::RetryableError do let(:response) { double(code: 401, header: { 'retry-after' => 3600 }) } let(:error) { Rpush::RetryableError.new(401, 12, "Unauthorized", response) } it "returns an informative message" do expect(error.to_s).to eq "Retryable error for 12, received ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/signal_handler_spec.rb
spec/unit/daemon/signal_handler_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::SignalHandler do def signal_handler(sig) Process.kill(sig, Process.pid) sleep 0.1 end def with_handler_start_stop Rpush::Daemon::SignalHandler.start yield ensure Rpush::Daemon::SignalHandler.stop end describe 'shutdown signals' do ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/delivery_spec.rb
spec/unit/daemon/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Delivery do class DeliverySpecDelivery < Rpush::Daemon::Delivery def initialize(batch) @batch = batch end end let(:now) { Time.parse("2014-10-14 00:00:00") } let(:batch) { double(Rpush::Daemon::Batch) } let(:delivery) { DeliverySpecDelivery.ne...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/app_runner_spec.rb
spec/unit/daemon/app_runner_spec.rb
require 'unit_spec_helper' require 'rpush/daemon/store/active_record' module Rpush module AppRunnerSpecService class App < Rpush::App end end module Daemon module AppRunnerSpecService extend ServiceConfigMethods class ServiceLoop def initialize(*) end def start ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/proc_title_spec.rb
spec/unit/daemon/proc_title_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::ProcTitle do it 'sets the process title' do Rpush.config.embedded = false Rpush.config.push = false allow(Rpush::Daemon::AppRunner).to receive_messages(total_dispatchers: 2, total_queued: 10) expect(Process).to receive(:setproctitle).with('rpush | 10...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/dispatcher_loop_spec.rb
spec/unit/daemon/dispatcher_loop_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::DispatcherLoop do def run_dispatcher_loop dispatcher_loop.start dispatcher_loop.stop end let(:notification) { double } let(:batch) { double(notification_processed: nil) } let(:queue) { Queue.new } let(:dispatcher) { double(dispatch: nil, cleanup: ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/delivery_error_spec.rb
spec/unit/daemon/delivery_error_spec.rb
require "unit_spec_helper" describe Rpush::DeliveryError do let(:error) { Rpush::DeliveryError.new(4, 12, "Missing payload") } it "returns an informative message" do expect(error.to_s).to eq "Unable to deliver notification 12, received error 4 (Missing payload)" end it "returns the error code" do exp...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/batch_spec.rb
spec/unit/daemon/batch_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Batch do let(:notification1) { double(:notification1, id: 1, delivered: false, failed: false) } let(:notification2) { double(:notification2, id: 2, delivered: false, failed: false) } let(:batch) { Rpush::Daemon::Batch.new([notification1, notification2]) } let(...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/feeder_spec.rb
spec/unit/daemon/feeder_spec.rb
require "unit_spec_helper" describe Rpush::Daemon::Feeder do let!(:app) { Rpush::Apns::App.create!(name: 'my_app', environment: 'development', certificate: TEST_CERT) } let(:notification) { Rpush::Apns::Notification.create!(device_token: "a" * 108, app: app) } let(:logger) { double } let(:interruptible_sleeper...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/webpush/delivery_spec.rb
spec/unit/daemon/webpush/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Webpush::Delivery do let(:app) { Rpush::Webpush::App.create!(name: 'MyApp', vapid_keypair: VAPID_KEYPAIR) } # Push subscription information as received from a client browser when the # user subscribed to push notifications. let(:device_reg) { { endpoint: ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/wns/delivery_spec.rb
spec/unit/daemon/wns/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Wns::Delivery do let(:app) { Rpush::Wns::App.create!(name: "MyApp", client_id: "someclient", client_secret: "somesecret", access_token: "access_token", access_token_expiration: Time.now + (60 * 10)) } let(:notification) { Rpush::Wns::Notification.create!(app: app,...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/wns/post_request_spec.rb
spec/unit/daemon/wns/post_request_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Wns::PostRequest do let(:app) do Rpush::Wns::App.create!( name: "MyApp", client_id: "someclient", client_secret: "somesecret", access_token: "access_token", access_token_expiration: Time.now + (60 * 10) ) end context 'Notif...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/dispatcher/apnsp8_http2_spec.rb
spec/unit/daemon/dispatcher/apnsp8_http2_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Dispatcher::Apnsp8Http2 do let(:app) { double(environment: "sandbox", apn_key: "my_key") } let(:delivery_class) { double } let(:notification) { double } let(:batch) { double(mark_delivered: nil, all_processed: nil) } let(:http2) { double(on: true) } let!(:...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/dispatcher/http_spec.rb
spec/unit/daemon/dispatcher/http_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Dispatcher::Http do let(:app) { double } let(:delivery_class) { double } let(:notification) { double } let(:batch) { double } let(:http) { double } let(:queue_payload) { Rpush::Daemon::QueuePayload.new(batch, notification) } let(:dispatcher) { Rpush::Dae...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/store/redis_spec.rb
spec/unit/daemon/store/redis_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Store::Redis do it_behaves_like 'Rpush::Daemon::Store' let(:app) { Rpush::Client::Redis::Apns::App.create!(name: 'my_app', environment: 'development', certificate: TEST_CERT) } let(:notification) { Rpush::Client::Redis::Apns::Notification.create!(device_token: ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/store/active_record_spec.rb
spec/unit/daemon/store/active_record_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Store::ActiveRecord do it_behaves_like 'Rpush::Daemon::Store' let(:app) { Rpush::Client::ActiveRecord::Apns::App.create!(name: 'my_app', environment: 'development', certificate: TEST_CERT) } let(:notification) { Rpush::Client::ActiveRecord::Apns::Notification.c...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/store/active_record/reconnectable_spec.rb
spec/unit/daemon/store/active_record/reconnectable_spec.rb
require 'unit_spec_helper' require 'rpush/daemon/store/active_record/reconnectable' describe Rpush::Daemon::Store::ActiveRecord::Reconnectable do class TestDouble include Rpush::Daemon::Store::ActiveRecord::Reconnectable attr_reader :name def initialize(error, max_calls) @error = error @max...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/apns/certificate_expired_error_spec.rb
spec/unit/daemon/apns/certificate_expired_error_spec.rb
require 'unit_spec_helper' describe Rpush::CertificateExpiredError do let(:app) { double(name: 'test') } let(:error) { Rpush::CertificateExpiredError.new(app, Time.now) } it 'returns a message' do error.message error.to_s end end
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/fcm/delivery_spec.rb
spec/unit/daemon/fcm/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Fcm::Delivery do let(:app) { Rpush::Fcm::App.create!(name: 'MyApp', firebase_project_id: 'abc123', json_key:'{}') } let(:notification) { Rpush::Fcm::Notification.create!(app: app, device_token: 'xyz', deliver_after: Time.now) } let(:logger) { double(error: nil, ...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/pushy/delivery_spec.rb
spec/unit/daemon/pushy/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Pushy::Delivery do let(:app) { Rpush::Pushy::App.create!(name: 'MyApp', api_key: 'my_api_key') } let(:token) { 'device token' } let(:data) { { message: 'some message' } } let(:notification) { Rpush::Pushy::Notification.create!(app: app, registration_ids: [toke...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/apnsp8/delivery_spec.rb
spec/unit/daemon/apnsp8/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Apnsp8::Delivery do subject(:delivery) { described_class.new(app, http2_client, token_provider, batch) } let(:app) { double(bundle_id: 'MY BUNDLE ID') } let(:notification1) { double('Notification 1', data: {}, as_json: {}).as_null_object } let(:notification2)...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/wpns/delivery_spec.rb
spec/unit/daemon/wpns/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Wpns::Delivery do let(:app) { Rpush::Wpns::App.create!(name: "MyApp") } let(:notification) { Rpush::Wpns::Notification.create!(app: app, data: { title: "MyApp", body: "Example notification", param: "/param1" }, uri: "http://some.example/", deliver_after: Time.now)...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/shared/store.rb
spec/unit/daemon/shared/store.rb
require 'unit_spec_helper' shared_examples 'Rpush::Daemon::Store' do subject(:store) { described_class.new } let(:app) { Rpush::Apns::App.create!(name: 'my_app', environment: 'development', certificate: TEST_CERT) } let(:notification) { Rpush::Apns::Notification.create!(device_token: "a" * 64, app: app) } let...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/unit/daemon/adm/delivery_spec.rb
spec/unit/daemon/adm/delivery_spec.rb
require 'unit_spec_helper' describe Rpush::Daemon::Adm::Delivery do let(:app) { Rpush::Adm::App.create!(name: 'MyApp', client_id: 'CLIENT_ID', client_secret: 'CLIENT_SECRET') } let(:notification) { Rpush::Adm::Notification.create!(app: app, registration_ids: ['xyz'], deliver_after: Time.now, data: { 'message' => '...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false
rpush/rpush
https://github.com/rpush/rpush/blob/a5ea408d732227c2ed0d23f8a91001d40768152e/spec/functional/embed_spec.rb
spec/functional/embed_spec.rb
require 'functional_spec_helper' describe 'embedding' do def create_app app = Rpush::Apns2::App.new app.certificate = TEST_CERT app.name = 'test' app.environment = 'development' app.bundle_id = 'com.example.app' app.save! app end let(:fake_device_token) { 'a' * 108 } let(:notificat...
ruby
MIT
a5ea408d732227c2ed0d23f8a91001d40768152e
2026-01-04T15:57:16.574030Z
false