Sha256: ad7b54488fbe98f5fb46c04563056093443bea61b5940e5674605251bde28c8e
Contents?: true
Size: 1017 Bytes
Versions: 6
Compression:
Stored size: 1017 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../../lib/rake_check/brakeman_checker') describe BrakemanChecker do let(:tracker) { stub("Tracker", checks: stub("Checks", warnings: [])) } it "gives N/A on no Rails Apps" do subject.result.should == { type: :brakeman, check_output: '', status: 'Rails App not found' } end it "gives OK with no Errors" do Brakeman.should_receive(:run).and_return tracker subject.stub(:`) subject.result.should == { type: :brakeman, check_output: '', status: "\e[32m0\e[0m Warnings" } end describe "Code Coverage" do it "is red with warnings" do tracker.checks.stub(warnings: [stub("Warning")]) tracker.stub(report: "Report") Brakeman.should_receive(:run).and_return tracker subject.result.should == { type: :brakeman, check_output: 'Report', status: "\e[31m1\e[0m Warnings" } end end end
Version data entries
6 entries across 6 versions & 1 rubygems