Sha256: b731efafcffdccb175840c994a06ee399619979e0c38846e011d9574783a69fd

Contents?: true

Size: 1.17 KB

Versions: 22

Compression:

Stored size: 1.17 KB

Contents

require 'dummy_spec_helper'
require 'integration/performance/helpers/rules'
describe "CanTango::Ability performance" do

  before(:each) do
    @user = User.create! :name => 'stanislaw', :role => 'user', :email => 'stanislaw@mail.ru'
    Article.create!(:title => 'one')
  end

  context "With cache disabled" do

    describe 'Memory store' do
      before do
        CanTango.configure do |config|
          config.cache.set :off
        end
      end

      it "3 requests" do
        get '/login_user/stanislaw'
        puts "\n\nFirst Request"
        get "/articles"
        puts "\n\nSecond Request"
        get "/articles"
        puts "\n\nThird Request"
        get "/articles"
      end
    end
  end

  context "With cache enabled" do

    describe 'Memory store' do
      before do
        CanTango.configure do |config|
          config.cache.set :on
          config.cache.store.default_type = :memory
        end
      end

      it "3 requests" do
        get '/login_user/stanislaw'
        puts "\n\nFirst Request"
        get "/articles"
        puts "\n\nSecond Request"
        get "/articles"
        puts "\n\nThird Request"
        get "/articles"
      end
    end
  end


end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/integration/performance/can_performance.rb
cantango-0.9.4.6 spec/integration/performance/can_performance.rb
cantango-0.9.4.5 spec/integration/performance/can_performance.rb
cantango-0.9.4.3 spec/integration/performance/can_performance.rb
cantango-0.9.4.2 spec/integration/performance/can_performance.rb
cantango-0.9.4.1 spec/integration/performance/can_performance.rb
cantango-0.9.4 spec/integration/performance/can_performance.rb
cantango-0.9.3.2 spec/integration/performance/can_performance.rb
cantango-0.8.9.5 spec/integration/performance/can_performance.rb
cantango-0.8.9.4 spec/integration/performance/can_performance.rb
cantango-0.8.9.3 spec/integration/performance/can_performance.rb
cantango-0.8.9.2 spec/integration/performance/can_performance.rb
cantango-0.8.9.1 spec/integration/performance/can_performance.rb
cantango-0.8.9 spec/integration/performance/can_performance.rb
cantango-0.8.8.1 spec/integration/performance/can_performance.rb
cantango-0.8.8 spec/integration/performance/can_performance.rb
cantango-0.8.7 spec/integration/performance/can_performance.rb
cantango-0.8.6.2 spec/integration/performance/can_performance.rb
cantango-0.8.6.1 spec/integration/performance/can_performance.rb
cantango-0.8.6 spec/integration/performance/can_performance.rb