Sha256: be2b314edf2064d6adcb430f30216c9462e0627034224762743511129adabf13

Contents?: true

Size: 760 Bytes

Versions: 12

Compression:

Stored size: 760 Bytes

Contents

require 'helper'

RSpec.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
        expect(string).to include(subject.object_id.to_s)
        expect(string).to include('name=:name')
        expect(string).to include('key=:key')
        expect(string).to include('data_type=:set')
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
flipper-0.10.2 spec/flipper/gate_spec.rb
flipper-0.10.1 spec/flipper/gate_spec.rb
flipper-0.10.0 spec/flipper/gate_spec.rb
flipper-0.9.2 spec/flipper/gate_spec.rb
flipper-0.9.1 spec/flipper/gate_spec.rb
flipper-0.9.0 spec/flipper/gate_spec.rb
flipper-0.9.0.beta1 spec/flipper/gate_spec.rb
flipper-0.8.0 spec/flipper/gate_spec.rb
flipper-0.7.5 spec/flipper/gate_spec.rb
flipper-0.7.4 spec/flipper/gate_spec.rb
flipper-0.7.3 spec/flipper/gate_spec.rb
flipper-0.7.2 spec/flipper/gate_spec.rb