Sha256: 290a95d82ed010dbe67d7b2fc5e19bd4a49ee529c5e4f1c997e6e19e3fda70d0

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

require 'diecut/configurable'

describe Diecut::Configurable do
  let :subclass do
    Class.new(described_class){
      setting :shallow
      setting :deeply, Class.new(Diecut::Configurable){
        setting :nested, Class.new(Diecut::Configurable){
          setting :field
        }
      }
    }.tap do |subclass|
      subclass.target_name = "for something"
    end
  end

  it "inspects nicely" do
    expect(subclass.inspect).to match(/Configurable.*something.*deeply\.nested\.field/)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
diecut-0.0.5 spec/configurable_spec.rb
diecut-0.0.4 spec/configurable_spec.rb
diecut-0.0.3 spec/configurable_spec.rb
diecut-0.0.2 spec/configurable_spec.rb
diecut-0.0.1 spec/configurable_spec.rb