From e645a938b66b4304a5ed2988cd9b4b7438f954cd Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Wed, 6 Jun 2018 13:34:20 -1000 Subject: [PATCH] remove skipped specs which no longer apply --- .../attribute_methods_spec.rb | 15 --------------- .../orm/active_record_spec.rb | 17 ----------------- 2 files changed, 32 deletions(-) diff --git a/spec/validates_timeliness/attribute_methods_spec.rb b/spec/validates_timeliness/attribute_methods_spec.rb index 0a55088..ad4cbc9 100644 --- a/spec/validates_timeliness/attribute_methods_spec.rb +++ b/spec/validates_timeliness/attribute_methods_spec.rb @@ -38,21 +38,6 @@ RSpec.describe ValidatesTimeliness::AttributeMethods do expect(e.redefined_birth_date_called).to be_truthy end - skip 'should be undefined if model class has dynamic attribute methods reset' do - # Force method definitions - PersonWithShim.validates_date :birth_date - r = PersonWithShim.new - r.birth_date = Time.now - - write_method = :birth_date= - - expect(PersonWithShim.send(:generated_timeliness_methods).instance_methods).to include(write_method) - - PersonWithShim.undefine_attribute_methods - - expect(PersonWithShim.send(:generated_timeliness_methods).instance_methods).not_to include(write_method) - end - context "with plugin parser" do with_config(:use_plugin_parser, true) diff --git a/spec/validates_timeliness/orm/active_record_spec.rb b/spec/validates_timeliness/orm/active_record_spec.rb index d6b11a2..973c243 100644 --- a/spec/validates_timeliness/orm/active_record_spec.rb +++ b/spec/validates_timeliness/orm/active_record_spec.rb @@ -1,5 +1,4 @@ RSpec.describe ValidatesTimeliness, 'ActiveRecord' do - context "validation methods" do let(:record) { Employee.new } @@ -50,22 +49,6 @@ RSpec.describe ValidatesTimeliness, 'ActiveRecord' do validates_datetime :some_datetime end } - - context 'for column attribute' do - skip 'should be detected from column type' do - expect(klass.timeliness_attribute_timezone_aware?(:birth_date)).to be_falsey - expect(klass.timeliness_attribute_timezone_aware?(:birth_time)).to be_falsey - expect(klass.timeliness_attribute_timezone_aware?(:birth_datetime)).to be_truthy - end - end - - context 'for non-column attribute' do - skip 'should be detected from the validation type' do - expect(klass.timeliness_attribute_timezone_aware?(:some_date)).to be_falsey - expect(klass.timeliness_attribute_timezone_aware?(:some_time)).to be_falsey - expect(klass.timeliness_attribute_timezone_aware?(:some_datetime)).to be_truthy - end - end end context "attribute write method" do