From 5eb57ad5553bd6da7c08b725d344fa1a7078493a Mon Sep 17 00:00:00 2001 From: James Cox Date: Wed, 23 Jan 2019 14:17:07 -0500 Subject: [PATCH] Remove no longer required active record stubs --- spec/support/active_record_data/3_2_diana.txt | 24 -- .../active_record_data/3_2_diana_legacy.txt | 24 -- spec/support/active_record_data/3_2_multi.txt | 50 ---- .../active_record_data/3_2_multi_legacy.txt | 50 ---- spec/support/active_record_data/4_0_diana.txt | 98 -------- spec/support/active_record_data/4_0_multi.txt | 198 ---------------- spec/support/active_record_data/4_1_diana.txt | 97 -------- spec/support/active_record_data/4_1_multi.txt | 196 ---------------- spec/support/active_record_data/4_2_diana.txt | 109 --------- .../active_record_data/4_2_diana_legacy.txt | 109 --------- spec/support/active_record_data/4_2_multi.txt | 220 ------------------ .../active_record_data/4_2_multi_legacy.txt | 220 ------------------ spec/support/rails_versions.rb | 22 +- 13 files changed, 1 insertion(+), 1416 deletions(-) delete mode 100644 spec/support/active_record_data/3_2_diana.txt delete mode 100644 spec/support/active_record_data/3_2_diana_legacy.txt delete mode 100644 spec/support/active_record_data/3_2_multi.txt delete mode 100644 spec/support/active_record_data/3_2_multi_legacy.txt delete mode 100644 spec/support/active_record_data/4_0_diana.txt delete mode 100644 spec/support/active_record_data/4_0_multi.txt delete mode 100644 spec/support/active_record_data/4_1_diana.txt delete mode 100644 spec/support/active_record_data/4_1_multi.txt delete mode 100644 spec/support/active_record_data/4_2_diana.txt delete mode 100644 spec/support/active_record_data/4_2_diana_legacy.txt delete mode 100644 spec/support/active_record_data/4_2_multi.txt delete mode 100644 spec/support/active_record_data/4_2_multi_legacy.txt diff --git a/spec/support/active_record_data/3_2_diana.txt b/spec/support/active_record_data/3_2_diana.txt deleted file mode 100644 index 0eb543f..0000000 --- a/spec/support/active_record_data/3_2_diana.txt +++ /dev/null @@ -1,24 +0,0 @@ -# false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } -> diff --git a/spec/support/active_record_data/3_2_diana_legacy.txt b/spec/support/active_record_data/3_2_diana_legacy.txt deleted file mode 100644 index 266ad53..0000000 --- a/spec/support/active_record_data/3_2_diana_legacy.txt +++ /dev/null @@ -1,24 +0,0 @@ -# false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - }, - attr_reader :mass_assignment_options = nil -> diff --git a/spec/support/active_record_data/3_2_multi.txt b/spec/support/active_record_data/3_2_multi.txt deleted file mode 100644 index e16765d..0000000 --- a/spec/support/active_record_data/3_2_multi.txt +++ /dev/null @@ -1,50 +0,0 @@ -[ - [0] # false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - >, - [1] # true, - "created_at" => "2003-05-26 14:15:00", - "id" => nil, - "name" => "Laura", - "rank" => 2 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - > -] diff --git a/spec/support/active_record_data/3_2_multi_legacy.txt b/spec/support/active_record_data/3_2_multi_legacy.txt deleted file mode 100644 index d5f840a..0000000 --- a/spec/support/active_record_data/3_2_multi_legacy.txt +++ /dev/null @@ -1,50 +0,0 @@ -[ - [0] # false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - }, - attr_reader :mass_assignment_options = nil - >, - [1] # true, - "created_at" => "2003-05-26 14:15:00", - "id" => nil, - "name" => "Laura", - "rank" => 2 - }, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - }, - attr_reader :mass_assignment_options = nil - > -] diff --git a/spec/support/active_record_data/4_0_diana.txt b/spec/support/active_record_data/4_0_diana.txt deleted file mode 100644 index a9dbd42..0000000 --- a/spec/support/active_record_data/4_0_diana.txt +++ /dev/null @@ -1,98 +0,0 @@ -# #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @previously_changed = {}, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } -> diff --git a/spec/support/active_record_data/4_0_multi.txt b/spec/support/active_record_data/4_0_multi.txt deleted file mode 100644 index 280b04c..0000000 --- a/spec/support/active_record_data/4_0_multi.txt +++ /dev/null @@ -1,198 +0,0 @@ -[ - [0] # #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @previously_changed = {}, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - >, - [1] # #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @previously_changed = {}, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => true, - "created_at" => "2003-05-26 14:15:00", - "id" => nil, - "name" => "Laura", - "rank" => 2 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - > -] diff --git a/spec/support/active_record_data/4_1_diana.txt b/spec/support/active_record_data/4_1_diana.txt deleted file mode 100644 index 3ea30da..0000000 --- a/spec/support/active_record_data/4_1_diana.txt +++ /dev/null @@ -1,97 +0,0 @@ -# #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } -> diff --git a/spec/support/active_record_data/4_1_multi.txt b/spec/support/active_record_data/4_1_multi.txt deleted file mode 100644 index 2256cb8..0000000 --- a/spec/support/active_record_data/4_1_multi.txt +++ /dev/null @@ -1,196 +0,0 @@ -[ - [0] # #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => false, - "created_at" => "1992-10-10 12:30:00", - "id" => nil, - "name" => "Diana", - "rank" => 1 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - >, - [1] # #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @column_types_override = nil, - @destroyed = false, - @marked_for_destruction = false, - @new_record = true, - @readonly = false, - @reflects_state = [ - [0] false - ], - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = { - "admin" => true, - "created_at" => "2003-05-26 14:15:00", - "id" => nil, - "name" => "Laura", - "rank" => 2 - }, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - > -] diff --git a/spec/support/active_record_data/4_2_diana.txt b/spec/support/active_record_data/4_2_diana.txt deleted file mode 100644 index 3f4c46c..0000000 --- a/spec/support/active_record_data/4_2_diana.txt +++ /dev/null @@ -1,109 +0,0 @@ -# false, - "created_at" => 1992-10-10 12:30:00 UTC, - "name" => "Diana", - "rank" => 1 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = false, - attr_reader :value_before_type_cast = false - >, - "created_at" => #, - attr_reader :value = 1992-10-10 12:30:00 UTC, - attr_reader :value_before_type_cast = "1992-10-10 12:30:00" - >, - "name" => #, - attr_reader :value = "Diana", - attr_reader :value_before_type_cast = "Diana" - >, - "rank" => #, - attr_reader :value = 1, - attr_reader :value_before_type_cast = 1 - > - }, - @materialized = false, - @types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } -> diff --git a/spec/support/active_record_data/4_2_diana_legacy.txt b/spec/support/active_record_data/4_2_diana_legacy.txt deleted file mode 100644 index 103568d..0000000 --- a/spec/support/active_record_data/4_2_diana_legacy.txt +++ /dev/null @@ -1,109 +0,0 @@ -# false, - "created_at" => 1992-10-10 12:30:00 UTC, - "name" => "Diana", - "rank" => 1 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = false, - attr_reader :value_before_type_cast = false - >, - "created_at" => #, - attr_reader :value = 1992-10-10 12:30:00 UTC, - attr_reader :value_before_type_cast = "1992-10-10 12:30:00" - >, - "name" => #, - attr_reader :value = "Diana", - attr_reader :value_before_type_cast = "Diana" - >, - "rank" => #, - attr_reader :value = 1, - attr_reader :value_before_type_cast = 1 - > - }, - attr_reader :types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - attr_reader :values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } -> diff --git a/spec/support/active_record_data/4_2_multi.txt b/spec/support/active_record_data/4_2_multi.txt deleted file mode 100644 index 689a0c6..0000000 --- a/spec/support/active_record_data/4_2_multi.txt +++ /dev/null @@ -1,220 +0,0 @@ -[ - [0] # false, - "created_at" => 1992-10-10 12:30:00 UTC, - "name" => "Diana", - "rank" => 1 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = false, - attr_reader :value_before_type_cast = false - >, - "created_at" => #, - attr_reader :value = 1992-10-10 12:30:00 UTC, - attr_reader :value_before_type_cast = "1992-10-10 12:30:00" - >, - "name" => #, - attr_reader :value = "Diana", - attr_reader :value_before_type_cast = "Diana" - >, - "rank" => #, - attr_reader :value = 1, - attr_reader :value_before_type_cast = 1 - > - }, - @materialized = false, - @types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - >, - [1] # true, - "created_at" => 2003-05-26 14:15:00 UTC, - "name" => "Laura", - "rank" => 2 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = true, - attr_reader :value_before_type_cast = true - >, - "created_at" => #, - attr_reader :value = 2003-05-26 14:15:00 UTC, - attr_reader :value_before_type_cast = "2003-05-26 14:15:00" - >, - "name" => #, - attr_reader :value = "Laura", - attr_reader :value_before_type_cast = "Laura" - >, - "rank" => #, - attr_reader :value = 2, - attr_reader :value_before_type_cast = 2 - > - }, - @materialized = false, - @types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - @values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - > -] diff --git a/spec/support/active_record_data/4_2_multi_legacy.txt b/spec/support/active_record_data/4_2_multi_legacy.txt deleted file mode 100644 index c826ff7..0000000 --- a/spec/support/active_record_data/4_2_multi_legacy.txt +++ /dev/null @@ -1,220 +0,0 @@ -[ - [0] # false, - "created_at" => 1992-10-10 12:30:00 UTC, - "name" => "Diana", - "rank" => 1 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = false, - attr_reader :value_before_type_cast = false - >, - "created_at" => #, - attr_reader :value = 1992-10-10 12:30:00 UTC, - attr_reader :value_before_type_cast = "1992-10-10 12:30:00" - >, - "name" => #, - attr_reader :value = "Diana", - attr_reader :value_before_type_cast = "Diana" - >, - "rank" => #, - attr_reader :value = 1, - attr_reader :value_before_type_cast = 1 - > - }, - attr_reader :types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - attr_reader :values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - >, - [1] # true, - "created_at" => 2003-05-26 14:15:00 UTC, - "name" => "Laura", - "rank" => 2 - }, - @readonly = false, - @transaction_state = nil, - @txn = nil, - attr_accessor :attributes = # #, - attr_reader :value = true, - attr_reader :value_before_type_cast = true - >, - "created_at" => #, - attr_reader :value = 2003-05-26 14:15:00 UTC, - attr_reader :value_before_type_cast = "2003-05-26 14:15:00" - >, - "name" => #, - attr_reader :value = "Laura", - attr_reader :value_before_type_cast = "Laura" - >, - "rank" => #, - attr_reader :value = 2, - attr_reader :value_before_type_cast = 2 - > - }, - attr_reader :types = { - "admin" => #, - "created_at" => #, - "id" => #, - "name" => #, - "rank" => # - }, - attr_reader :values = { - "admin" => nil, - "created_at" => nil, - "id" => nil, - "name" => nil, - "rank" => nil - } - > - >, - attr_accessor :destroyed_by_association = nil, - attr_reader :association_cache = {}, - attr_reader :changed_attributes = { - "admin" => nil, - "created_at" => nil, - "name" => nil, - "rank" => nil - } - > -] diff --git a/spec/support/rails_versions.rb b/spec/support/rails_versions.rb index e6c6d1f..c75a591 100644 --- a/spec/support/rails_versions.rb +++ b/spec/support/rails_versions.rb @@ -14,29 +14,9 @@ module RailsVersions alias_method :activerecord_5_1?, :rails_5_1? def rails_5_0? - Gem::Requirement.new('~> 5.0.0.racecar1').satisfied_by?(rails_version) + Gem::Requirement.new('~> 5.0.0').satisfied_by?(rails_version) end alias_method :activerecord_5_0?, :rails_5_0? - - def rails_4_2? - Gem::Requirement.new('~> 4.2.0').satisfied_by?(rails_version) - end - alias_method :activerecord_4_2?, :rails_4_2? - - def rails_4_1? - Gem::Requirement.new('~> 4.1.0').satisfied_by?(rails_version) - end - alias_method :activerecord_4_1?, :rails_4_1? - - def rails_4_0? - Gem::Requirement.new('~> 4.0.0').satisfied_by?(rails_version) - end - alias_method :activerecord_4_0?, :rails_4_0? - - def rails_3_2? - Gem::Requirement.new('~> 3.2.0').satisfied_by?(rails_version) - end - alias_method :activerecord_3_2?, :rails_3_2? end RSpec.configure do |config|