Skip to content

Commit

Permalink
Add missing dependencies, fix broken albino tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Nov 15, 2009
1 parent a947350 commit f5df2e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Rakefile
Expand Up @@ -21,6 +21,12 @@ begin
s.add_dependency('maruku', '>= 0.5.9')
s.add_dependency('directory_watcher', '>= 1.1.1')
s.add_dependency('open4', '>= 0.9.6')
s.add_development_dependency('redgreen', '>= 1.2.2')
s.add_development_dependency('shoulda', '>= 2.10.2')
s.add_development_dependency('rr', '>= 0.10.4')
s.add_development_dependency('open4', '>= 1.0.1')
s.add_development_dependency('test-spec', '>= 0.10.0')
s.add_development_dependency('mocha', '>= 0.9.8')
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler --version '>= 0.11.0'"
Expand Down
11 changes: 8 additions & 3 deletions lib/jekyll/albino.rb
Expand Up @@ -41,7 +41,12 @@
# Chris Wanstrath // chris@ozmm.org
# GitHub // http://github.com
#
require 'open4'
begin
require 'open4'
rescue LoadError
require 'rubygems'
require 'open4'
end

class Albino
@@bin = Rails.development? ? 'pygmentize' : '/usr/bin/pygmentize' rescue 'pygmentize'
Expand Down Expand Up @@ -98,12 +103,12 @@ def convert_options(options = {})

specify "defaults to text" do
syntaxer = Albino.new(__FILE__)
syntaxer.expects(:execute).with('pygmentize -f html -l text').returns(true)
syntaxer.expects(:execute).with('pygmentize -l text -f html -O encoding=utf-8').returns(true)
syntaxer.colorize
end

specify "accepts options" do
@syntaxer.expects(:execute).with('pygmentize -f html -l ruby').returns(true)
@syntaxer.expects(:execute).with('pygmentize -l ruby -f html -O encoding=utf-8').returns(true)
@syntaxer.colorize
end

Expand Down
2 changes: 1 addition & 1 deletion test/helper.rb
@@ -1,5 +1,5 @@
require 'rubygems'
gem 'RedCloth', '= 4.2.1'
gem 'RedCloth', '>= 4.2.1'

require File.join(File.dirname(__FILE__), *%w[.. lib jekyll])

Expand Down

0 comments on commit f5df2e1

Please sign in to comment.