Skip to content

Commit

Permalink
skipjava
Browse files Browse the repository at this point in the history
  • Loading branch information
akzhan committed Jun 27, 2016
1 parent a119373 commit f4d1976
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/css_parser/parser.rb
Expand Up @@ -488,7 +488,7 @@ def read_remote_file(uri) # :nodoc:
return '', nil
elsif res.code.to_i >= 300 and res.code.to_i < 400
if res.response['Location'] != nil
return read_remote_file Addressable::URI.parse(URI::encode(res.response['Location']))
return read_remote_file Addressable::URI.parse(URI.escape(res.response['Location']))
end
end

Expand Down
12 changes: 3 additions & 9 deletions test/test_css_parser_loading.rb
Expand Up @@ -5,14 +5,6 @@ class CssParserLoadingTests < Minitest::Test
include CssParser
include WEBrick

def pending_if(condition, reason, &block)
if condition
pending(reason, &block)
else
yield
end
end

def setup
# from http://nullref.se/blog/2006/5/17/testing-with-webrick
@cp = Parser.new
Expand Down Expand Up @@ -78,7 +70,9 @@ def test_loading_a_remote_file
# http://github.com/premailer/css_parser/issues#issue/4
def test_loading_a_remote_file_over_ssl
# TODO: test SSL locally
pending_if(RUBY_PLATFORM =~ /java|jruby/, "does not work on jruby") do
if RUBY_PLATFORM == 'java'
skip "SSL: does not work on jruby"
else
@cp.load_uri!("https://dialect.ca/inc/screen.css")
assert_match( /margin\: 0\;/, @cp.find_by_selector('body').join(' ') )
end
Expand Down

0 comments on commit f4d1976

Please sign in to comment.