Sha256: 3293910b7f544f9642d004ce2254a203eca2c2d4b394299a0f2b91c35baca3c3

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick::Rules::ExampleTag, '#valid?' do
  subject { described_class.new(document).valid? }

  let(:document) { double('document') }

  context 'with example tag' do
    before do
      document.stub(:has_tag?).with('example').and_return(true)
    end

    it { should be(true) }
  end

  context 'without example tag' do
    before do
      document.stub(:has_tag?).with('example').and_return(false)
    end

    it { should be(false) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yardstick-0.9.9 spec/unit/yardstick/rules/example_tag/valid_predicate_spec.rb
yardstick-0.9.8 spec/unit/yardstick/rules/example_tag/valid_predicate_spec.rb
yardstick-0.9.7 spec/unit/yardstick/rules/example_tag/valid_predicate_spec.rb