Sha256: a9d235e106c48d67bbbccb403284e286a9e03f7adc81ec69fb983b9f2a83df9a

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:document) { double('document', summary_text: text) }

  context 'with short summary' do
    let(:text) { 'A summary' }

    it { should be(true) }
  end

  context 'with short summary that includes umlauts' do
    let(:text) { 'รถ' * 79 }

    it { should be(true) }
  end

  context 'with too long summary' do
    let(:text) { 'a' * 81 }

    it { should be(false) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yardstick-0.9.7 spec/unit/yardstick/rules/summary/length/valid_predicate_spec.rb