spec/reactor_spec.rb in reactor-0.10.1 vs spec/reactor_spec.rb in reactor-0.11.0

- old
+ new

@@ -1,15 +1,15 @@ require 'spec_helper' +Reactor.in_test_mode do + class SomeClass + include Reactor::Subscribable + on_event :test_event, -> (event) { self.spy_on_me } + end +end describe Reactor do - let(:subscriber) do - Reactor.in_test_mode do - Class.new(ActiveRecord::Base) do - on_event :test_event, -> (event) { self.spy_on_me } - end - end - end + let(:subscriber) { SomeClass } describe '.test_mode!' do it 'sets Reactor into test mode' do expect(Reactor.test_mode?).to be_falsey Reactor.test_mode!