Sha256: 126767bbd2d9af3e0956b17a7ae53122da63d01646441310045ff4a500bc644d

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

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

    it { should be(true) }
  end

  context 'without api tag' do
    before do
      document.stub(:has_tag?).with('api').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/api_tag/presence/valid_predicate_spec.rb
yardstick-0.9.8 spec/unit/yardstick/rules/api_tag/presence/valid_predicate_spec.rb
yardstick-0.9.7 spec/unit/yardstick/rules/api_tag/presence/valid_predicate_spec.rb