lib/hornsby.rb in sinsiliux-hornsby-0.2.3 vs lib/hornsby.rb in sinsiliux-hornsby-0.2.4
- old
+ new
@@ -24,11 +24,11 @@
@@global_executed_scenarios = @@executed_scenarios.to_a
config.include(HornsbySpecHelper)
config.before do
- @@context = @@global_context.clone
- @@executed_scenarios = Set.new(@@global_executed_scenarios)
+ Hornsby.send(:class_variable_set, '@@context', Hornsby.send(:class_variable_get, '@@global_context').clone)
+ Hornsby.send(:class_variable_set, '@@executed_scenarios', Set.new(Hornsby.send(:class_variable_get, '@@global_executed_scenarios')))
Hornsby.copy_ivars(self, true)
ActiveRecord::Base.connection.increment_open_transactions
ActiveRecord::Base.connection.transaction_joinable = false
ActiveRecord::Base.connection.begin_db_transaction
end