spec/plugin_spec.rb in danger-iblinter-0.0.2 vs spec/plugin_spec.rb in danger-iblinter-0.0.3
- old
+ new
@@ -23,18 +23,19 @@
linter = IBLinterRunner.new("/path/to/binary")
allow(linter).to receive(:lint) do
JSON.parse(File.read(File.dirname(__FILE__) + "/support/fixtures/iblinter.json"))
end
allow(@iblinter).to receive(:iblinter).and_return(linter)
+ allow(@iblinter).to receive(:iblinter_installed?).and_return(true)
allow(Dir).to receive(:pwd).and_return("/home/projects")
allow(File).to receive(:exist?).and_return(true)
@iblinter.lint("/home/projects")
errors = [
- Violation.new("Error message", false, "bar/File.xib", 0),
+ Violation.new("Error message", false, "bar/File.xib", nil),
Violation.new("Failed due to IBLinter errors", false, nil, nil)
]
warnings = [
- Violation.new("Warning message", false, "foo/File.xib", 0)
+ Violation.new("Warning message", false, "foo/File.xib", nil)
]
expect(@iblinter.violation_report[:errors]).to eq errors
expect(@iblinter.violation_report[:warnings]).to eq warnings
end
end