Sha256: 0fca7d71dfbb5547c382a574d30eb8d39f98a577a8d8432ae22fc6a9e8de64c2
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
require_relative '../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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tailor-1.0.1 | spec/tailor/problem_spec.rb |
tailor-1.0.0 | spec/tailor/problem_spec.rb |