Sha256: 4004acd6d721258a5a8a7c3b76140310fa49490dc830ac0294172b9160e73261
Contents?: true
Size: 1.05 KB
Versions: 3
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' require 'tailor/problem' describe Tailor::Problem do before do Tailor::Problem.any_instance.stub(:log) end let(:lineno) { 10 } let(:column) { 11 } describe '#set_values' do before do Tailor::Problem.any_instance.stub(:message) end it 'sets self[:type] to the type param' do Tailor::Problem.new(:test, lineno, column, '', :b). should include(type: :test) end it 'sets self[:line] to the lineno param' do Tailor::Problem.new(:test, lineno, column, '', :c). should include(line: lineno) end it 'sets self[:column] to the column param' do Tailor::Problem.new(:test, lineno, column, '', :d). should include(column: column) end it 'sets self[:message] to the message param' do Tailor::Problem.new(:test, lineno, column, 'test', :d). should include(message: 'test') end it 'sets self[:level] to the level param' do Tailor::Problem.new(:test, lineno, column, 'test', :d). should include(level: :d) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tailor-1.4.0 | spec/unit/tailor/problem_spec.rb |
tailor-1.3.1 | spec/unit/tailor/problem_spec.rb |
tailor-1.3.0 | spec/unit/tailor/problem_spec.rb |