Sha256: fddbdc0d0f700b8eb643bb211c3ca01510d2ee28298043ed08025150741b3cc8

Contents?: true

Size: 730 Bytes

Versions: 7

Compression:

Stored size: 730 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)

describe "The .kick handler" do
  it "should reset $LOADED_FEATURES and callback chains to state before loading .kick and reload .kick" do
    ReloadDotKick.save_state
    
    features_before_dot_kick = $LOADED_FEATURES.dup
    chains_before_dot_kick = Kicker.full_chain.map { |c| c.dup }
    
    ReloadDotKick.expects(:load).with('.kick').twice
    
    2.times do
      require File.expand_path('../../fixtures/a_file_thats_reloaded', __FILE__)
      process {}
      ReloadDotKick.call(%w{ .kick })
    end
    
    $FROM_RELOADED_FILE.should == 2
    $LOADED_FEATURES.should == features_before_dot_kick
    Kicker.full_chain.should == chains_before_dot_kick
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kicker-2.4.0 test/recipes/dot_kick_test.rb
kicker-2.3.1 test/recipes/dot_kick_test.rb
kicker-2.3.0 test/recipes/dot_kick_test.rb
kicker-2.2.3 test/recipes/dot_kick_test.rb
kicker-2.2.2 test/recipes/dot_kick_test.rb
kicker-2.2.1 test/recipes/dot_kick_test.rb
kicker-2.2.0 test/recipes/dot_kick_test.rb