Skip to content

Commit f2bf04c

Browse files
committed
Add back requires_active_support
1 parent ed6a89b commit f2bf04c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

spec/examples/schedule_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@
757757
expect(schedule.occurs_on?(Time.new(2010, 7, 3, 0, 0, 1, "+11:15"))).to be_falsey
758758
end
759759

760-
specify 'should determine if it occurs on the day of a given ActiveSupport::Time' do
760+
specify 'should determine if it occurs on the day of a given ActiveSupport::Time', :requires_active_support => true do
761761
Time.zone = "Pacific/Honolulu"
762762
expect(schedule.occurs_on?(Time.zone.parse('2010-07-01 23:59:59'))).to be_falsey
763763
expect(schedule.occurs_on?(Time.zone.parse('2010-07-02 00:00:01'))).to be_truthy
@@ -784,7 +784,7 @@
784784
include_examples 'occurring on a given day'
785785
end
786786

787-
context 'starting from an ActiveSupport::Time' do
787+
context 'starting from an ActiveSupport::Time', :requires_active_support => true do
788788
let(:start_time) { Time.new(2010, 7, 2, 10, 0, 0, '-07:00').in_time_zone('America/Vancouver') }
789789
include_examples 'occurring on a given day'
790790
end

spec/examples/to_yaml_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ module IceCube
144144

145145
# This test will fail when not run in Eastern Time
146146
# This is a bug because to_datetime will always convert to system local time
147-
it 'should be able to roll forward times and get back times in an array - TimeWithZone' do
147+
it 'should be able to roll forward times and get back times in an array - TimeWithZone', :requires_active_support => true do
148148
Time.zone = "Eastern Time (US & Canada)"
149149
start_time = Time.zone.local(2011, 11, 5, 12, 0, 0)
150150
schedule = Schedule.new(start_time)

spec/spec_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323

2424
config.include WarningHelpers
2525

26+
config.before :each do |example|
27+
if example.metadata[:requires_active_support]
28+
raise 'ActiveSupport required but not present' unless defined?(ActiveSupport)
29+
end
30+
end
31+
2632
config.around :each do |example|
2733
if zone = example.metadata[:system_time_zone]
2834
@orig_zone = ENV['TZ']

0 commit comments

Comments
 (0)