Sha256: 570a1ea3f9c2439ea0100b690a256ad22d6dca52e457337da8af5788e1437085

Contents?: true

Size: 585 Bytes

Versions: 4

Compression:

Stored size: 585 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "lib", "staticmatic")

describe "Deprecation of old methods" do
  before :all do
    @sample_site_path   = File.dirname(__FILE__) + "/fixtures/sample"
    @staticmatic        = StaticMatic::Base.new(@sample_site_path)
    @staticmatic.logger = mock("logger") # Mock the logger
  end
  
  it "should display a message for deprecated methods" do 
    def deprecate_test
      @staticmatic.deprecate :alt => "another_method"
    end
    
    @staticmatic.logger.should_receive(:warn).with(/has been deprecated/)
    deprecate_test
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tdreyno-staticmatic-2.1.1 spec/deprecation_spec.rb
tdreyno-staticmatic-2.1.3 spec/deprecation_spec.rb
tdreyno-staticmatic-2.1.4 spec/deprecation_spec.rb
tdreyno-staticmatic-2.9.0 spec/deprecation_spec.rb