Sha256: 3d17b4b749a85d81858b8c09f6936b6d659f20b89626737a182c061f21e764de

Contents?: true

Size: 1.71 KB

Versions: 25

Compression:

Stored size: 1.71 KB

Contents

# -*- encoding: utf-8 -*-

require_relative 'spec_helper'

describe SiteValidator::Message do
  before(:each) do
    @error_message   = SiteValidator::Message.new('25',
                                                  100,
                                                  20,
                                                  message_text('25'),
                                                  :error,
                                                  'a code snippet',
                                                  'an explanation')
    @warning_message = SiteValidator::Message.new('25',
                                                  100,
                                                  20,
                                                  message_text('25'),
                                                  :warning,
                                                  'a code snippet',
                                                  'an explanation')
  end

  it "should have a message_id" do
    @error_message.message_id.should == '25'
  end

  it "should have a line" do
    @error_message.line.should == 100
  end

  it "should have a col" do
    @error_message.col.should == 20
  end

  it "should have a text" do
    @error_message.text.should == message_text('25')
  end

  it "should have a type" do
    @error_message.type.should    == :error
    @warning_message.type.should  == :warning
  end

  it "should have a source" do
    @error_message.source.should    == 'a code snippet'
    @warning_message.source.should  == 'a code snippet'
  end

  it "should have an explanation" do
    @error_message.explanation.should    == 'an explanation'
    @warning_message.explanation.should  == 'an explanation'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
site_validator-2.1.2 spec/message_spec.rb
site_validator-2.1.1 spec/message_spec.rb
site_validator-2.1.0 spec/message_spec.rb
site_validator-2.0.0 spec/message_spec.rb
site_validator-1.7.4 spec/message_spec.rb
site_validator-1.7.3 spec/message_spec.rb
site_validator-1.7.2 spec/message_spec.rb
site_validator-1.7.1 spec/message_spec.rb
site_validator-1.7.0 spec/message_spec.rb
site_validator-1.6.0 spec/message_spec.rb
site_validator-1.5.0 spec/message_spec.rb
site_validator-1.4.1 spec/message_spec.rb
site_validator-1.3.11 spec/message_spec.rb
site_validator-1.3.10 spec/message_spec.rb
site_validator-1.3.9 spec/message_spec.rb
site_validator-1.3.8 spec/message_spec.rb
site_validator-1.3.7 spec/message_spec.rb
site_validator-1.3.6 spec/message_spec.rb
site_validator-1.3.5 spec/message_spec.rb
site_validator-1.3.4 spec/message_spec.rb