Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't use regex when testing SSL

  • Loading branch information...
commit 16c94a7c85f910d1f7ba283b929d19a03a0080ee 1 parent 8382388
Adam Lowe and Veezus Kreist authored Hashrocket Workstation committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 spec/story_spec.rb
View
9 spec/story_spec.rb
@@ -25,14 +25,13 @@
end
it "uses https if set in the config" do
- Story.stub!(:yaml).and_return({"ssl" => true})
- # Need these two method calls to set up the class vars correctly
- Story.yaml['ssl'].should be_true
+ Story.stub(:yaml => {"ssl" => true})
Story.config['ssl'].should be_true
-
Story.site.scheme.should == "https"
Story.ssl_options[:verify_mode].should == 1
- File.open(File.expand_path('lib/cacert.pem')).readlines.find_all{ |l| l =~ /^Equifax/ }.count.should == 4
+
+ # Not sure what this next line is testing
+ File.open(File.expand_path('lib/cacert.pem')).readlines.find_all{ |l| l.starts_with?("Equifax") }.count.should == 4
@jc00ke
jc00ke added a note

This isn't really needed, but I thought it would be a comfort of some sort to show that the cert we are using does in fact contain the info for the CA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.