Permalink
Browse files

try loading file in binary mode to avoid an encoding issue in ruby 1.9+

  • Loading branch information...
1 parent c72e8d2 commit 42266b3cb1f78ccc3fba1d2abef2fe94233f684c Andrew Cantino & Chris Alvarado-Dryden committed with Andrew Cantino Mar 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/jasmine/spec_builder.rb
@@ -34,7 +34,7 @@ def guess_example_locations
previous_indent_level = 0
@config.spec_files_full_paths.each do |filename|
line_number = 1
- File.open(filename, "r") do |file|
+ File.open(filename, "rb") do |file|
file.readlines.each do |line|
match = /^(\s*)(describe|it)\s*\(\s*["'](.*)["']\s*,\s*function/.match(line)
if (match)

0 comments on commit 42266b3

Please sign in to comment.