spec/integration_spec.rb in mrjoy-bundler-audit-0.3.5 vs spec/integration_spec.rb in mrjoy-bundler-audit-0.3.6

- old
+ new

@@ -75,11 +75,11 @@ end it "should show the version and number of known advisories" do # It prints a name based on $0, so our wrapper mucks up the display in a # predictable way. - subject.should match(/^wrapper\.rb #{Regexp.quote('0.3.4')} \(advisories: \d+\)/) + subject.should match(/^wrapper\.rb #{Regexp.quote(Bundler::Audit::VERSION)} \(advisories: \d+\)/) end end context "when auditing a bundle with ignored gems" do let(:bundle) { 'unpatched_gems' } @@ -109,10 +109,12 @@ it "should print warnings about insecure sources" do subject.should include(%{ Insecure Source URI found: git://github.com/rails/jquery-rails.git Insecure Source URI found: http://rubygems.org/ }.strip) + + subject.should include(%{Insecure sources found!}) end end context "when auditing a secure bundle" do let(:bundle) { 'secure' } @@ -127,10 +129,11 @@ it "should notify us properly when everything is fine" do # We check the end of the output because a DB install/update "may" ( # _will_, in the case of the test but _may_ in the real world) have been # performed. - subject.strip.should =~ /No unpatched versions found\Z/ + subject.should =~ /^No unpatched versions found$/ + subject.should =~ /^No insecure sources found$/ end else it "should notify us properly when everything is fine" do pending "Requires ActiveSupport 4.x, which requires Ruby >= 1.9.3." end