Sha256: 53dc727582ac89669685a6af4d5edd7affa4a5b0562518bc17b021287f5bd86f

Contents?: true

Size: 733 Bytes

Versions: 5

Compression:

Stored size: 733 Bytes

Contents

require "spec_helper"

module Chanko
  describe ActiveIf do
    around do |example|
      origin, $stderr = $stderr, StringIO.new
      example.run
      $stderr = origin
    end

    describe ".new" do
      context "with option arguments" do
        it "prints warning message on standard error output" do
          ActiveIf.new(foo: "bar")
          $stderr.string.should =~ /\Aoptions in ActiveIf#new are deprecated and are never used at #{__FILE__}/
        end
      end
    end

    describe "#options" do
      it "prints warning message on standard error output" do
        ActiveIf.new.options
        $stderr.string.should =~ /\AActiveIf#options is deprecated and is never used at #{__FILE__}/
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chanko-2.0.6 spec/chanko/deprecated_spec.rb
chanko-2.0.5 spec/chanko/deprecated_spec.rb
chanko-2.0.4 spec/chanko/deprecated_spec.rb
chanko-2.0.3 spec/chanko/deprecated_spec.rb
chanko-2.0.2 spec/chanko/deprecated_spec.rb