File tree Expand file tree Collapse file tree 3 files changed +1
-11
lines changed Expand file tree Collapse file tree 3 files changed +1
-11
lines changed Original file line number Diff line number Diff line change
1
+ require "coderay"
1
2
require "haml"
2
3
3
4
# CodeRay filter for Haml. Specify which language to highlight with a shebang
17
18
# @see http://rubydoc.info/gems/coderay/CodeRay/Scanners
18
19
module Haml ::Filters ::CodeRay
19
20
include Haml ::Filters ::Base
20
- lazy_require "coderay"
21
21
22
22
ENCODER = :div
23
23
ENCODER_OPTIONS = { }
@@ -66,7 +66,6 @@ def render(text)
66
66
# @see Haml::Filters::CodeRay
67
67
module Haml ::Filters ::CodeRay_raw
68
68
include Haml ::Filters ::Base
69
- lazy_require "coderay"
70
69
71
70
def compile ( precompiler , text )
72
71
text = Haml ::Helpers ::find_and_preserve (
Original file line number Diff line number Diff line change 1
1
require "spec_helper"
2
2
3
- Haml ::Filters ::CodeRay . send ( :resolve_lazy_requires )
4
-
5
3
describe Haml ::Filters ::CodeRay do
6
4
it_should_behave_like "haml-coderay filters"
7
5
Original file line number Diff line number Diff line change 20
20
end
21
21
end
22
22
23
- RSpec ::Matchers . define :lazy_require do |library |
24
- match do |filter |
25
- filter . instance_variable_get ( :@lazy_requires ) . include? ( library . to_s )
26
- end
27
- end
28
-
29
23
shared_examples_for "haml-coderay filters" do
30
24
it { should include_module Haml ::Filters ::Base }
31
- it { should lazy_require :coderay }
32
25
end
You can’t perform that action at this time.
0 commit comments