Sha256: 8252552811ea360006ff83be022f014c299a03ee3e0af7a6d86af77ff3574992

Contents?: true

Size: 979 Bytes

Versions: 3

Compression:

Stored size: 979 Bytes

Contents

require 'spec_helper'

module RedpenRuby
  describe RedpenRuby do
    it 'include "ValidationError" should be false' do
      message = FormatMessage.new("sampledoc-en.md:2: ValidationError[SentenceLength], 文長が最大値 \"215\" を超えています", "1.0.1")
      result = message.valid?
      expect(result).to be false
    end
    it 'does not include "ValidationError" should be true' do
      message = FormatMessage.new("aaa", "1.0.1")
      result = message.valid?
      expect(result).to be true
    end
    it 'does not include "ValidationError" should be true' do
      message = FormatMessage.new("aaa", "1.0.1")
      result = message.valid?
      expect(result).to be true
    end
    it 'message is correct' do
      message = FormatMessage.new('aaa', '1.0.1')
      expect(message.messages).to eq ['aaa']
    end
    it 'version is correct' do
      message = FormatMessage.new('aaa', '1.0.1')
      expect(message.version).to eq '1.0.1'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
redpen_ruby-0.4 spec/redpen_ruby/format_message_spec.rb
redpen_ruby-0.3 spec/redpen_ruby/format_message_spec.rb
redpen_ruby-0.2 spec/redpen_ruby/format_message_spec.rb