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 |
|---|---|---|---|---|---|---|---|---|
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/requireable.rb | provider/vendor/gems/validatable-1.6.7/lib/requireable.rb | module Validatable
module Requireable #:nodoc:
module ClassMethods #:nodoc:
def requires(*args)
required_options.concat args
end
def required_options
@required_options ||= []
end
end
def self.included(klass)
klass.extend ClassMethods
en... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/child_validation.rb | provider/vendor/gems/validatable-1.6.7/lib/child_validation.rb | module Validatable
class ChildValidation #:nodoc:
attr_accessor :attribute, :map, :should_validate_proc
def initialize(attribute, map, should_validate_proc)
@attribute = attribute
@map = map
@should_validate_proc = should_validate_proc
end
def should_validate?(instance)
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validatable_class_methods.rb | provider/vendor/gems/validatable-1.6.7/lib/validatable_class_methods.rb | module Validatable
module ClassMethods #:nodoc:
def validate_children(instance, group)
self.children_to_validate.each do |child_validation|
next unless child_validation.should_validate?(instance)
child = instance.send child_validation.attribute
if (child.respond_to?(:valid_for_g... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_numericality_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_numericality_of.rb | module Validatable
class ValidatesNumericalityOf < ValidationBase #:nodoc:
option :only_integer
def valid?(instance)
value = instance.send(self.attribute).to_s
regex = self.only_integer ? /\A[+-]?\d+\Z/ : /^\d*\.{0,1}\d+$/
not (value =~ regex).nil?
end
def message(instance... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_format_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_format_of.rb | module Validatable
class ValidatesFormatOf < ValidationBase #:nodoc:
required_option :with
def valid?(instance)
not (instance.send(self.attribute).to_s =~ self.with).nil?
end
def message(instance)
super || "is invalid"
end
end
end | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validation_base.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validation_base.rb | module Validatable
class ValidationBase #:nodoc:
class << self
def required_option(*args)
option(*args)
requires(*args)
end
def option(*args)
attr_accessor(*args)
understands(*args)
end
def default(hash)
defaults.merge! hash
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_true_for.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_true_for.rb | module Validatable
class ValidatesTrueFor < ValidationBase #:nodoc:
required_option :logic
def valid?(instance)
instance.instance_eval(&logic) == true
end
def message(instance)
super || "is invalid"
end
end
end | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_length_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_length_of.rb | module Validatable
class ValidatesLengthOf < ValidationBase #:nodoc:
option :minimum, :maximum, :is, :within, :allow_nil
def message(instance)
super || "is invalid"
end
def valid?(instance)
valid = true
value = instance.send(self.attribute)
if value.nil?
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_confirmation_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_confirmation_of.rb | module Validatable
class ValidatesConfirmationOf < ValidationBase #:nodoc:
option :case_sensitive
default :case_sensitive => true
def valid?(instance)
return instance.send(self.attribute) == instance.send("#{self.attribute}_confirmation".to_sym) if case_sensitive
instance.send(self.attrib... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_presence_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_presence_of.rb | module Validatable
class ValidatesPresenceOf < ValidationBase #:nodoc:
def valid?(instance)
return false if instance.send(self.attribute).nil?
instance.send(self.attribute).respond_to?(:strip) ? instance.send(self.attribute).strip.length != 0 : true
end
def message(instance)
super ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_each.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_each.rb | module Validatable
class ValidatesEach < ValidationBase #:nodoc:
required_option :logic
def valid?(instance)
instance.instance_eval(&logic)
true # return true so no error is added. should look in the future at doing this different.
end
def message(instance)
super || "is inval... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/validatable-1.6.7/lib/validations/validates_acceptance_of.rb | provider/vendor/gems/validatable-1.6.7/lib/validations/validates_acceptance_of.rb | module Validatable
class ValidatesAcceptanceOf < ValidationBase #:nodoc:
def valid?(instance)
instance.send(self.attribute) == "true"
end
def message(instance)
super || "must be accepted"
end
end
end | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/scripts/publish.rb | provider/vendor/gems/builder-2.1.2/scripts/publish.rb | # Optional publish task for Rake
require 'rake/contrib/sshpublisher'
require 'rake/contrib/rubyforgepublisher'
publisher = Rake::CompositePublisher.new
publisher.add Rake::RubyForgePublisher.new('builder', 'jimweirich')
publisher.add Rake::SshFilePublisher.new(
'umlcoop',
'htdocs/software/builder',
'.',
'buil... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/test/testblankslate.rb | provider/vendor/gems/builder-2.1.2/test/testblankslate.rb | #!/usr/bin/env ruby
require 'test/unit'
require 'test/preload'
require 'builder/blankslate'
require 'stringio'
# Methods to be introduced into the Object class late.
module LateObject
def late_object
33
end
def LateObject.included(mod)
# Modules defining an included method should not prevent blank
#... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/test/test_xchar.rb | provider/vendor/gems/builder-2.1.2/test/test_xchar.rb | #!/usr/bin/env ruby
require 'test/unit'
require 'builder/xchar'
class TestXmlEscaping < Test::Unit::TestCase
def test_ascii
assert_equal 'abc', 'abc'.to_xs
end
def test_predefined
assert_equal '&', '&'.to_xs # ampersand
assert_equal '<', '<'.to_xs # left angle brac... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/test/preload.rb | provider/vendor/gems/builder-2.1.2/test/preload.rb | #!/usr/bin/env ruby
# We are defining method_added in Kernel and Object so that when
# BlankSlate overrides them later, we can verify that it correctly
# calls the older hooks.
module Kernel
class << self
attr_reader :k_added_names
alias_method :preload_method_added, :method_added
def method_added(name)... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/test/testmarkupbuilder.rb | provider/vendor/gems/builder-2.1.2/test/testmarkupbuilder.rb | #!/usr/bin/env ruby
#--
# Portions copyright 2004 by Jim Weirich (jim@weirichhouse.org).
# Portions copyright 2005 by Sam Ruby (rubys@intertwingly.net).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# ab... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/test/testeventbuilder.rb | provider/vendor/gems/builder-2.1.2/test/testeventbuilder.rb | class TestEvents < Test::Unit::TestCase
class Target
attr_reader :events
def initialize
@events = []
end
def start_tag(tag, attrs)
@events << [:start_tag, tag, attrs]
end
def end_tag(tag)
@events << [:end_tag, tag]
end
def text(string)
@events << [:text... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder.rb | provider/vendor/gems/builder-2.1.2/lib/builder.rb | #!/usr/bin/env ruby
#--
# Copyright 2004 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
require 'builder/xmlmarkup'
requir... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/blankslate.rb | provider/vendor/gems/builder-2.1.2/lib/blankslate.rb | #!/usr/bin/env ruby
#--
# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
#############################... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder/xmlevents.rb | provider/vendor/gems/builder-2.1.2/lib/builder/xmlevents.rb | #!/usr/bin/env ruby
#--
# Copyright 2004 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
require 'builder/xmlmarkup'
modul... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder/xmlmarkup.rb | provider/vendor/gems/builder-2.1.2/lib/builder/xmlmarkup.rb | #!/usr/bin/env ruby
#--
# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
# Provide a flexible and easy... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder/xmlbase.rb | provider/vendor/gems/builder-2.1.2/lib/builder/xmlbase.rb | #!/usr/bin/env ruby
require 'builder/blankslate'
module Builder
# Generic error for builder
class IllegalBlockError < RuntimeError; end
# XmlBase is a base class for building XML builders. See
# Builder::XmlMarkup and Builder::XmlEvents for examples.
class XmlBase < BlankSlate
# Create an XML markup... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder/xchar.rb | provider/vendor/gems/builder-2.1.2/lib/builder/xchar.rb | #!/usr/bin/env ruby
# The XChar library is provided courtesy of Sam Ruby (See
# http://intertwingly.net/stories/2005/09/28/xchar.rb)
# --------------------------------------------------------------------
# If the Builder::XChar module is not currently defined, fail on any
# name clashes in standard library classes.
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/builder-2.1.2/lib/builder/blankslate.rb | provider/vendor/gems/builder-2.1.2/lib/builder/blankslate.rb | #!/usr/bin/env ruby
#--
# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
require 'blankslate'
#######... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/spec_helper.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/spec_helper.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'rubygems'
gem 'rspec'
require 'spec'
unless defined?(CI_REPORTER_LIB)
CI_REPORTER_LIB = File.expand_path(File.dirname(__FILE__) + "/../lib")
$: << CI_REPO... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/cucumber_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/cucumber_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
require 'ci/reporter/cucumber'
describe "The Cucumber reporter" do
describe CI::Reporter::CucumberFailure do... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/output_capture_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/output_capture_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
require 'rexml/document'
describe "Output capture" do
before(:each) do
@suite = CI::Reporter::TestSuite.... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/report_manager_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/report_manager_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
describe "The ReportManager" do
before(:each) do
@reports_dir = REPORTS_DIR
end
after(:each) do
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/rspec_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/rspec_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
require 'stringio'
describe "The RSpec reporter" do
before(:each) do
@error = mock("error")
@error.s... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/test_suite_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/test_suite_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
require 'rexml/document'
describe "A TestSuite" do
before(:each) do
@suite = CI::Reporter::TestSuite.new... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/test_unit_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/test_unit_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
describe "The TestUnit reporter" do
before(:each) do
@report_mgr = mock("report manager")
@testunit ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/rake/rake_tasks_spec.rb | provider/vendor/gems/ci_reporter-1.6.2/spec/ci/reporter/rake/rake_tasks_spec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../../spec_helper.rb"
require 'rake'
def save_env(v)
ENV["PREV_#{v}"] = ENV[v]
end
def restore_env(v)
ENV[v] = ENV["PREV_#{v}... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/core.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/core.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'ci/reporter/test_suite'
require 'ci/reporter/report_manager'
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/cucumber.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/cucumber.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'ci/reporter/core'
tried_gem = false
begin
require 'cucumber'
require 'cucumber/ast/visitor'
rescue LoadError
unless tried_gem
tried_gem = true
re... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/version.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/version.rb | module CI
module Reporter
VERSION = "1.6.2"
end
end
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/test_unit.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/test_unit.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'ci/reporter/core'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
module CI
module Reporter
# Factory for constructing either a CI::Report... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/report_manager.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/report_manager.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'fileutils'
module CI #:nodoc:
module Reporter #:nodoc:
class ReportManager
def initialize(prefix)
@basedir = ENV['CI_REPORTS'] || File.exp... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rspec.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rspec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'ci/reporter/core'
tried_gem = false
begin
require 'spec'
require 'spec/runner/formatter/progress_bar_formatter'
require 'spec/runner/formatter/specdoc_fo... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/test_suite.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/test_suite.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
require 'delegate'
require 'stringio'
module CI
module Reporter
# Emulates/delegates IO to $stdout or $stderr in order to capture output to report in the XML fil... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/cucumber.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/cucumber.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
namespace :ci do
namespace :setup do
task :cucumber_report_cleanup do
rm_rf ENV["CI_REPORTS"] || "features/reports"
end
task :cucumber => :cucumber... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/cucumber_loader.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/cucumber_loader.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
$: << File.dirname(__FILE__) + "/../../.."
require 'ci/reporter/cucumber'
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/test_unit.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/test_unit.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
namespace :ci do
namespace :setup do
task :testunit do
rm_rf ENV["CI_REPORTS"] || "test/reports"
ENV["TESTOPTS"] = "#{ENV["TESTOPTS"]} #{File.dirname(... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/rspec_loader.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/rspec_loader.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
$: << File.dirname(__FILE__) + "/../../.."
require 'ci/reporter/rspec'
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/rspec.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/rspec.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
namespace :ci do
namespace :setup do
task :spec_report_cleanup do
rm_rf ENV["CI_REPORTS"] || "spec/reports"
end
task :rspec => :spec_report_cleanup... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/test_unit_loader.rb | provider/vendor/gems/ci_reporter-1.6.2/lib/ci/reporter/rake/test_unit_loader.rb | # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
$: << File.dirname(__FILE__) + "/../../.."
require 'ci/reporter/test_unit'
module Test #:nodoc:all
module Unit
module UI
module Console
class TestR... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/install.rb | provider/vendor/rails/activerecord/install.rb | require 'rbconfig'
require 'find'
require 'ftools'
include Config
# this was adapted from rdoc's install.rb by ways of Log4r
$sitedir = CONFIG["sitelibdir"]
unless $sitedir
version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
$libdir = File.join(CONFIG["libdir"], "ruby", version)
$sitedir = $:.find {|x| x =~ /sit... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/config.rb | provider/vendor/rails/activerecord/test/config.rb | TEST_ROOT = File.expand_path(File.dirname(__FILE__))
ASSETS_ROOT = TEST_ROOT + "/assets"
FIXTURES_ROOT = TEST_ROOT + "/fixtures"
MIGRATIONS_ROOT = TEST_ROOT + "/migrations"
SCHEMA_ROOT = TEST_ROOT + "/schema"
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb | provider/vendor/rails/activerecord/test/cases/schema_authorization_test_postgresql.rb | require "cases/helper"
class SchemaThing < ActiveRecord::Base
end
class SchemaAuthorizationTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
TABLE_NAME = 'schema_things'
COLUMNS = [
'id serial primary key',
'name character varying(50)'
]
USERS = ['rails_pg_schema_user1', 'rails_... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/pk_test.rb | provider/vendor/rails/activerecord/test/cases/pk_test.rb | require "cases/helper"
require 'models/topic'
require 'models/reply'
require 'models/subscriber'
require 'models/movie'
require 'models/keyboard'
require 'models/mixed_case_monkey'
class PrimaryKeysTest < ActiveRecord::TestCase
fixtures :topics, :subscribers, :movies, :mixed_case_monkeys
def test_integer_key
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/migration_test.rb | provider/vendor/rails/activerecord/test/cases/migration_test.rb | require "cases/helper"
require 'bigdecimal/util'
require 'models/person'
require 'models/topic'
require 'models/developer'
require MIGRATIONS_ROOT + "/valid/1_people_have_last_names"
require MIGRATIONS_ROOT + "/valid/2_we_need_reminders"
require MIGRATIONS_ROOT + "/decimal/1_give_me_big_numbers"
require MIGRATIONS_RO... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | true |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/attribute_methods_test.rb | provider/vendor/rails/activerecord/test/cases/attribute_methods_test.rb | require "cases/helper"
require 'models/topic'
require 'models/minimalistic'
class AttributeMethodsTest < ActiveRecord::TestCase
fixtures :topics
def setup
@old_suffixes = ActiveRecord::Base.send(:attribute_method_suffixes).dup
@target = Class.new(ActiveRecord::Base)
@target.table_name = 'topics'
end
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/locking_test.rb | provider/vendor/rails/activerecord/test/cases/locking_test.rb | require "cases/helper"
require 'models/person'
require 'models/reader'
require 'models/legacy_thing'
require 'models/reference'
class LockWithoutDefault < ActiveRecord::Base; end
class LockWithCustomColumnWithoutDefault < ActiveRecord::Base
set_table_name :lock_without_defaults_cust
set_locking_column :custom_loc... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb | provider/vendor/rails/activerecord/test/cases/class_inheritable_attributes_test.rb | require 'test/unit'
require "cases/helper"
require 'active_support/core_ext/class/inheritable_attributes'
class A
include ClassInheritableAttributes
end
class B < A
write_inheritable_array "first", [ :one, :two ]
end
class C < A
write_inheritable_array "first", [ :three ]
end
class D < B
write_inheritable_a... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/connection_test_mysql.rb | provider/vendor/rails/activerecord/test/cases/connection_test_mysql.rb | require "cases/helper"
class MysqlConnectionTest < ActiveRecord::TestCase
def setup
super
@connection = ActiveRecord::Base.connection
end
def test_mysql_reconnect_attribute_after_connection_with_reconnect_true
run_without_connection do |orig_connection|
ActiveRecord::Base.establish_connection(... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/autosave_association_test.rb | provider/vendor/rails/activerecord/test/cases/autosave_association_test.rb | require 'cases/helper'
require 'models/bird'
require 'models/company'
require 'models/customer'
require 'models/developer'
require 'models/order'
require 'models/parrot'
require 'models/person'
require 'models/pirate'
require 'models/post'
require 'models/reader'
require 'models/ship'
require 'models/ship_part'
require... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/connection_pool_test.rb | provider/vendor/rails/activerecord/test/cases/connection_pool_test.rb | require "cases/helper"
class ConnectionManagementTest < ActiveRecord::TestCase
def setup
@env = {}
@app = stub('App')
@management = ActiveRecord::ConnectionAdapters::ConnectionManagement.new(@app)
@connections_cleared = false
ActiveRecord::Base.stubs(:clear_active_connections!).with { @conne... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/transactions_test.rb | provider/vendor/rails/activerecord/test/cases/transactions_test.rb | require "cases/helper"
require 'models/topic'
require 'models/reply'
require 'models/developer'
require 'models/book'
class TransactionTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
fixtures :topics, :developers
def setup
@first, @second = Topic.find(1, 2).sort_by { |t| t.id }
end
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb | provider/vendor/rails/activerecord/test/cases/active_schema_test_mysql.rb | require "cases/helper"
class ActiveSchemaTest < ActiveRecord::TestCase
def setup
ActiveRecord::ConnectionAdapters::MysqlAdapter.class_eval do
alias_method :execute_without_stub, :execute
def execute(sql, name = nil) return sql end
end
end
def teardown
ActiveRecord::ConnectionAdapters::My... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/date_time_test.rb | provider/vendor/rails/activerecord/test/cases/date_time_test.rb | require "cases/helper"
require 'models/topic'
require 'models/task'
class DateTimeTest < ActiveRecord::TestCase
def test_saves_both_date_and_time
time_values = [1807, 2, 10, 15, 30, 45]
now = DateTime.civil(*time_values)
task = Task.new
task.starting = now
task.save!
# check against Time.lo... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/readonly_test.rb | provider/vendor/rails/activerecord/test/cases/readonly_test.rb | require "cases/helper"
require 'models/post'
require 'models/comment'
require 'models/developer'
require 'models/project'
require 'models/reader'
require 'models/person'
# Dummy class methods to test implicit association scoping.
def Comment.foo() find :first end
def Project.foo() find :first end
class ReadOnlyTest ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/ar_schema_test.rb | provider/vendor/rails/activerecord/test/cases/ar_schema_test.rb | require "cases/helper"
if ActiveRecord::Base.connection.supports_migrations?
class ActiveRecordSchemaTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@connection = ActiveRecord::Base.connection
end
def teardown
@connection.drop_table :fruits rescue nil
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/lifecycle_test.rb | provider/vendor/rails/activerecord/test/cases/lifecycle_test.rb | require "cases/helper"
require 'models/topic'
require 'models/developer'
require 'models/reply'
require 'models/minimalistic'
class Topic; def after_find() end end
class Developer; def after_find() end end
class SpecialDeveloper < Developer; end
class TopicManualObserver
include Singleton
attr_reader :action, :o... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/modules_test.rb | provider/vendor/rails/activerecord/test/cases/modules_test.rb | require "cases/helper"
require 'models/company_in_module'
class ModulesTest < ActiveRecord::TestCase
fixtures :accounts, :companies, :projects, :developers
def setup
# need to make sure Object::Firm and Object::Client are not defined,
# so that constantize will not be able to cheat when having to load nam... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb | provider/vendor/rails/activerecord/test/cases/copy_table_test_sqlite.rb | require "cases/helper"
class CopyTableTest < ActiveRecord::TestCase
fixtures :companies, :comments
def setup
@connection = ActiveRecord::Base.connection
class << @connection
public :copy_table, :table_structure, :indexes
end
end
def test_copy_table(from = 'customers', to = 'customers2', opt... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb | provider/vendor/rails/activerecord/test/cases/synonym_test_oracle.rb | require "cases/helper"
require 'models/topic'
require 'models/subject'
# confirm that synonyms work just like tables; in this case
# the "subjects" table in Oracle (defined in oci.sql) is just
# a synonym to the "topics" table
class TestOracleSynonym < ActiveRecord::TestCase
def test_oracle_synonym
topic = Top... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/inheritance_test.rb | provider/vendor/rails/activerecord/test/cases/inheritance_test.rb | require "cases/helper"
require 'models/company'
require 'models/project'
require 'models/subscriber'
class InheritanceTest < ActiveRecord::TestCase
fixtures :companies, :projects, :subscribers, :accounts
def test_class_with_store_full_sti_class_returns_full_name
old = ActiveRecord::Base.store_full_sti_class
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/adapter_test.rb | provider/vendor/rails/activerecord/test/cases/adapter_test.rb | require "cases/helper"
class AdapterTest < ActiveRecord::TestCase
def setup
@connection = ActiveRecord::Base.connection
end
def test_tables
tables = @connection.tables
assert tables.include?("accounts")
assert tables.include?("authors")
assert tables.include?("tasks")
assert tables.inclu... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb | provider/vendor/rails/activerecord/test/cases/active_schema_test_postgresql.rb | require 'cases/helper'
class PostgresqlActiveSchemaTest < Test::Unit::TestCase
def setup
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
alias_method :real_execute, :execute
def execute(sql, name = nil) sql end
end
end
def teardown
ActiveRecord::ConnectionAdapters::Post... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/finder_test.rb | provider/vendor/rails/activerecord/test/cases/finder_test.rb | require "cases/helper"
require 'models/post'
require 'models/author'
require 'models/categorization'
require 'models/comment'
require 'models/company'
require 'models/topic'
require 'models/reply'
require 'models/entrant'
require 'models/developer'
require 'models/customer'
require 'models/job'
require 'models/categori... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | true |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/serialization_test.rb | provider/vendor/rails/activerecord/test/cases/serialization_test.rb | require "cases/helper"
require 'models/contact'
class SerializationTest < ActiveRecord::TestCase
FORMATS = [ :xml, :json ]
def setup
@contact_attributes = {
:name => 'aaron stack',
:age => 25,
:avatar => 'binarydata',
:created_at => Time.utc(2006, 8, 1),
:awe... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/unconnected_test.rb | provider/vendor/rails/activerecord/test/cases/unconnected_test.rb | require "cases/helper"
class TestRecord < ActiveRecord::Base
end
class TestUnconnectedAdapter < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@underlying = ActiveRecord::Base.connection
@specification = ActiveRecord::Base.remove_connection
end
def teardown
@underlying ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/repair_helper.rb | provider/vendor/rails/activerecord/test/cases/repair_helper.rb | module ActiveRecord
module Testing
module RepairHelper
def self.included(base)
base.class_eval do
extend ClassMethods
end
end
module Toolbox
def self.record_validations(*model_classes)
model_classes.inject({}) do |repair, klass|
repair[kla... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/validations_i18n_test.rb | provider/vendor/rails/activerecord/test/cases/validations_i18n_test.rb | require "cases/helper"
require 'models/topic'
require 'models/reply'
require 'models/person'
module ActiveRecordValidationsI18nTestHelper
def store_translations(*args)
data = args.extract_options!
locale = args.shift || 'en'
I18n.backend.send(:init_translations)
I18n.backend.store_translations(locale... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | true |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/method_scoping_test.rb | provider/vendor/rails/activerecord/test/cases/method_scoping_test.rb | require "cases/helper"
require 'models/post'
require 'models/author'
require 'models/developer'
require 'models/project'
require 'models/comment'
require 'models/category'
class MethodScopingTest < ActiveRecord::TestCase
fixtures :authors, :developers, :projects, :comments, :posts, :developers_projects
def test_s... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/invalid_date_test.rb | provider/vendor/rails/activerecord/test/cases/invalid_date_test.rb | require 'cases/helper'
require 'models/topic'
class InvalidDateTest < Test::Unit::TestCase
def test_assign_valid_dates
valid_dates = [[2007, 11, 30], [1993, 2, 28], [2008, 2, 29]]
invalid_dates = [[2007, 11, 31], [1993, 2, 29], [2007, 2, 29]]
topic = Topic.new
valid_dates.each do |date_src|
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/fixtures_test.rb | provider/vendor/rails/activerecord/test/cases/fixtures_test.rb | require "cases/helper"
require 'models/post'
require 'models/binary'
require 'models/topic'
require 'models/computer'
require 'models/developer'
require 'models/company'
require 'models/task'
require 'models/reply'
require 'models/joke'
require 'models/course'
require 'models/category'
require 'models/parrot'
require '... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/column_definition_test.rb | provider/vendor/rails/activerecord/test/cases/column_definition_test.rb | require "cases/helper"
class ColumnDefinitionTest < ActiveRecord::TestCase
def setup
@adapter = ActiveRecord::ConnectionAdapters::AbstractAdapter.new(nil)
def @adapter.native_database_types
{:string => "varchar"}
end
end
# Avoid column definitions in create table statements like:
# `title` v... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/batches_test.rb | provider/vendor/rails/activerecord/test/cases/batches_test.rb | require 'cases/helper'
require 'models/post'
class EachTest < ActiveRecord::TestCase
fixtures :posts
def setup
@posts = Post.all(:order => "id asc")
@total = Post.count
end
def test_each_should_excecute_one_query_per_batch
assert_queries(Post.count + 1) do
Post.find_each(:batch_size => 1)... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/callbacks_observers_test.rb | provider/vendor/rails/activerecord/test/cases/callbacks_observers_test.rb | require "cases/helper"
class Comment < ActiveRecord::Base
attr_accessor :callers
before_validation :record_callers
def after_validation
record_callers
end
def record_callers
callers << self.class if callers
end
end
class CommentObserver < ActiveRecord::Observer
attr_accessor :callers
def a... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/named_scope_test.rb | provider/vendor/rails/activerecord/test/cases/named_scope_test.rb | require "cases/helper"
require 'models/post'
require 'models/topic'
require 'models/comment'
require 'models/reply'
require 'models/author'
require 'models/developer'
class NamedScopeTest < ActiveRecord::TestCase
fixtures :posts, :authors, :topics, :comments, :author_addresses
def test_implements_enumerable
a... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/query_cache_test.rb | provider/vendor/rails/activerecord/test/cases/query_cache_test.rb | require "cases/helper"
require 'models/topic'
require 'models/reply'
require 'models/task'
require 'models/course'
require 'models/category'
require 'models/post'
class QueryCacheTest < ActiveRecord::TestCase
fixtures :tasks, :topics, :categories, :posts, :categories_posts
def test_find_queries
assert_querie... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb | provider/vendor/rails/activerecord/test/cases/reserved_word_test_mysql.rb | require "cases/helper"
class Group < ActiveRecord::Base
Group.table_name = 'group'
belongs_to :select, :class_name => 'Select'
has_one :values
end
class Select < ActiveRecord::Base
Select.table_name = 'select'
has_many :groups
end
class Values < ActiveRecord::Base
Values.table_name = 'values'
end
class ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/database_statements_test.rb | provider/vendor/rails/activerecord/test/cases/database_statements_test.rb | require "cases/helper"
class DatabaseStatementsTest < ActiveRecord::TestCase
def setup
@connection = ActiveRecord::Base.connection
end
def test_insert_should_return_the_inserted_id
id = @connection.insert("INSERT INTO accounts (firm_id,credit_limit) VALUES (42,5000)")
assert_not_nil id
end
end
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb | provider/vendor/rails/activerecord/test/cases/datatype_test_postgresql.rb | require "cases/helper"
class PostgresqlArray < ActiveRecord::Base
end
class PostgresqlMoney < ActiveRecord::Base
end
class PostgresqlNumber < ActiveRecord::Base
end
class PostgresqlTime < ActiveRecord::Base
end
class PostgresqlNetworkAddress < ActiveRecord::Base
end
class PostgresqlBitString < ActiveRecord::Base
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/multiple_db_test.rb | provider/vendor/rails/activerecord/test/cases/multiple_db_test.rb | require "cases/helper"
require 'models/entrant'
# So we can test whether Course.connection survives a reload.
require_dependency 'models/course'
class MultipleDbTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@courses = create_fixtures("courses") { Course.retrieve_connection ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/reload_models_test.rb | provider/vendor/rails/activerecord/test/cases/reload_models_test.rb | require "cases/helper"
require 'models/owner'
require 'models/pet'
class ReloadModelsTest < ActiveRecord::TestCase
fixtures :pets
def test_has_one_with_reload
pet = Pet.find_by_name('parrot')
pet.owner = Owner.find_by_name('ashley')
# Reload the class Owner, simulating auto-reloading of model classes... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/calculations_test.rb | provider/vendor/rails/activerecord/test/cases/calculations_test.rb | require "cases/helper"
require 'models/company'
require 'models/topic'
require 'models/edge'
require 'models/owner'
require 'models/pet'
require 'models/toy'
require 'models/club'
require 'models/organization'
Company.has_many :accounts
class NumericData < ActiveRecord::Base
self.table_name = 'numeric_data'
end
cl... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/sanitize_test.rb | provider/vendor/rails/activerecord/test/cases/sanitize_test.rb | require "cases/helper"
require 'models/binary'
class SanitizeTest < ActiveRecord::TestCase
def setup
end
def test_sanitize_sql_array_handles_string_interpolation
quoted_bambi = ActiveRecord::Base.connection.quote_string("Bambi")
assert_equal "name=#{quoted_bambi}", Binary.send(:sanitize_sql_array, ["nam... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb | provider/vendor/rails/activerecord/test/cases/schema_test_postgresql.rb | require "cases/helper"
class SchemaTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
SCHEMA_NAME = 'test_schema'
SCHEMA2_NAME = 'test_schema2'
TABLE_NAME = 'things'
CAPITALIZED_TABLE_NAME = 'Things'
INDEX_A_NAME = 'a_index_things_on_name'
INDEX_B_NAME = 'b_index_things_on_different_c... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/connection_test_firebird.rb | provider/vendor/rails/activerecord/test/cases/connection_test_firebird.rb | require "cases/helper"
class FirebirdConnectionTest < ActiveRecord::TestCase
def test_charset_properly_set
fb_conn = ActiveRecord::Base.connection.instance_variable_get(:@connection)
assert_equal 'UTF8', fb_conn.database.character_set
end
end
| ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/associations_test.rb | provider/vendor/rails/activerecord/test/cases/associations_test.rb | require "cases/helper"
require 'models/developer'
require 'models/project'
require 'models/company'
require 'models/topic'
require 'models/reply'
require 'models/computer'
require 'models/customer'
require 'models/order'
require 'models/categorization'
require 'models/category'
require 'models/post'
require 'models/aut... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/binary_test.rb | provider/vendor/rails/activerecord/test/cases/binary_test.rb | require "cases/helper"
# Without using prepared statements, it makes no sense to test
# BLOB data with DB2 or Firebird, because the length of a statement
# is limited to 32KB.
unless current_adapter?(:SybaseAdapter, :DB2Adapter, :FirebirdAdapter)
require 'models/binary'
class BinaryTest < ActiveRecord::TestCase
... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/reflection_test.rb | provider/vendor/rails/activerecord/test/cases/reflection_test.rb | require "cases/helper"
require 'models/topic'
require 'models/customer'
require 'models/company'
require 'models/company_in_module'
require 'models/subscriber'
require 'models/pirate'
class ReflectionTest < ActiveRecord::TestCase
fixtures :topics, :customers, :companies, :subscribers
def setup
@first = Topic.... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/schema_dumper_test.rb | provider/vendor/rails/activerecord/test/cases/schema_dumper_test.rb | require "cases/helper"
require 'stringio'
class SchemaDumperTest < ActiveRecord::TestCase
def standard_dump
stream = StringIO.new
ActiveRecord::SchemaDumper.ignore_tables = []
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream)
stream.string
end
def test_schema_dump
outpu... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb | provider/vendor/rails/activerecord/test/cases/aaa_create_tables_test.rb | # The filename begins with "aaa" to ensure this is the first test.
require "cases/helper"
class AAACreateTablesTest < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def test_load_schema
eval(File.read(SCHEMA_ROOT + "/schema.rb"))
if File.exists?(adapter_specific_schema_file)
eval(Fil... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/xml_serialization_test.rb | provider/vendor/rails/activerecord/test/cases/xml_serialization_test.rb | require "cases/helper"
require 'models/contact'
require 'models/post'
require 'models/author'
require 'models/tagging'
require 'models/comment'
require 'models/company_in_module'
class XmlSerializationTest < ActiveRecord::TestCase
def test_should_serialize_default_root
@xml = Contact.new.to_xml
assert_match ... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/pooled_connections_test.rb | provider/vendor/rails/activerecord/test/cases/pooled_connections_test.rb | require "cases/helper"
class PooledConnectionsTest < ActiveRecord::TestCase
def setup
super
@connection = ActiveRecord::Base.remove_connection
end
def teardown
ActiveRecord::Base.clear_all_connections!
ActiveRecord::Base.establish_connection(@connection)
super
end
def checkout_connectio... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/dirty_test.rb | provider/vendor/rails/activerecord/test/cases/dirty_test.rb | require 'cases/helper'
require 'models/topic' # For booleans
require 'models/pirate' # For timestamps
require 'models/parrot'
require 'models/person' # For optimistic locking
class Pirate # Just reopening it, not defining it
attr_accessor :detected_changes_in_after_update # Boolean for if changes are detected... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
ThoughtWorksStudios/oauth2_provider | https://github.com/ThoughtWorksStudios/oauth2_provider/blob/d54702f194edd05389968cf8947465860abccc5d/provider/vendor/rails/activerecord/test/cases/helper.rb | provider/vendor/rails/activerecord/test/cases/helper.rb | $:.unshift(File.dirname(__FILE__) + '/../../lib')
$:.unshift(File.dirname(__FILE__) + '/../../../activesupport/lib')
require 'config'
require 'rubygems'
require 'test/unit'
require 'stringio'
require 'active_record'
require 'active_record/test_case'
require 'active_record/fixtures'
require 'connection'
require 'cas... | ruby | MIT | d54702f194edd05389968cf8947465860abccc5d | 2026-01-04T17:46:04.645080Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.