Sha256: f90158b8a056e37b4d895eb079e901566597c348ebfed2edf4d2785e2a4b8f1f

Contents?: true

Size: 429 Bytes

Versions: 10

Compression:

Stored size: 429 Bytes

Contents

# It appears that rails caches the filter chain after the first request. We
# can't wait and only apply this if any @slow_updates scenarios are executed.
class SurveyorController
  before_filter(:only => :update) do
    if $delay_updates
      Rails.logger.info "Slowing things down."
      sleep 2
    end
  end
end

Before('@slow_updates') do
  $delay_updates = true
end

After('@slow_updates') do
  $delay_updates = false
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
affectiva-surveyor-1.5.0.pre.disco.2 features/support/slow_updates.rb
hssc_surveyor-1.4.3.pre features/support/slow_updates.rb
hssc_surveyor-1.4.2.pre features/support/slow_updates.rb
hssc_surveyor-1.4.1.pre features/support/slow_updates.rb
surveyor-1.4.0 features/support/slow_updates.rb
surveyor-1.3.0 features/support/slow_updates.rb
surveyor-1.2.0 features/support/slow_updates.rb
surveyor-1.1.0 features/support/slow_updates.rb
surveyor-1.0.1 features/support/slow_updates.rb
surveyor-1.0.0 features/support/slow_updates.rb