Sha256: cf13d8b8005f799b42b998c78839cd83123b2f351417257f709a56c1a6de1db3

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick::Rule, '#initialize' do
  let(:document) { DocumentMock.new }

  context 'when rule config not given' do
    subject { described_class.new(document) }

    it { should be_a(described_class) }

    it { should be_enabled }
  end

  context 'when rule config is given' do
    subject { described_class.new(document, config) }

    let(:config) { Yardstick::RuleConfig.new(enabled: false) }

    it { should be_a(described_class) }

    it { should_not be_enabled }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yardstick-0.9.7 spec/unit/yardstick/rule/initialize_spec.rb