Sha256: 8a2e3055ac2e00873947a7da9a38dc3facbe685acee6ea8afabb10ccbfa76d7a

Contents?: true

Size: 738 Bytes

Versions: 7

Compression:

Stored size: 738 Bytes

Contents

require 'helper'

describe Flipper::Gate do
  let(:feature_name) { :stats }

  subject {
    described_class.new
  }

  describe "#inspect" do
    context "for subclass" do
      let(:subclass) {
        Class.new(described_class) {
          def name
            :name
          end

          def key
            :key
          end

          def data_type
            :set
          end
        }
      }

      subject {
        subclass.new
      }

      it "includes attributes" do
        string = subject.inspect
        string.should include(subject.object_id.to_s)
        string.should include('name=:name')
        string.should include('key=:key')
        string.should include('data_type=:set')
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flipper-0.7.1 spec/flipper/gate_spec.rb
flipper-0.7.0 spec/flipper/gate_spec.rb
flipper-0.7.0.beta6 spec/flipper/gate_spec.rb
flipper-0.7.0.beta5 spec/flipper/gate_spec.rb
flipper-0.7.0.beta4 spec/flipper/gate_spec.rb
flipper-0.7.0.beta3 spec/flipper/gate_spec.rb
flipper-0.7.0.beta2 spec/flipper/gate_spec.rb