Skip to content

Commit

Permalink
Add and/or fix guards to that specs run correctly without tilt installed
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 25, 2023
1 parent b3fe9af commit c04bf24
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions spec/plugin/additional_render_engines_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
require_relative "../spec_helper"

begin
require 'tilt'
require 'tilt/erb'
require 'tilt/string'
require_relative '../../lib/roda/plugins/render'
rescue LoadError
warn "tilt not installed, skipping render plugin test"
else
describe "additional_render_engines plugin" do
it "supports additional render engines" do
app(:bare) do
Expand All @@ -18,3 +26,4 @@
proc{body('/nonexistent')}.must_raise Errno::ENOENT
end
end
end
9 changes: 9 additions & 0 deletions spec/plugin/additional_view_directories_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
require_relative "../spec_helper"

begin
require 'tilt'
require 'tilt/erb'
require 'tilt/string'
require_relative '../../lib/roda/plugins/render'
rescue LoadError
warn "tilt not installed, skipping render plugin test"
else
describe "additional_view_directories plugin" do
it "supports additional view directories" do
app(:bare) do
Expand Down Expand Up @@ -41,3 +49,4 @@
app.render_opts[:allowed_paths].must_equal expected
end
end
end
2 changes: 1 addition & 1 deletion spec/plugin/content_for_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
body.strip.must_equal "bar foobaz"
end
end
end

describe "content_for plugin with mixed template engines" do
before do
Expand Down Expand Up @@ -130,3 +129,4 @@
body('/a').strip.must_equal "bar\nfoo"
end
end
end

0 comments on commit c04bf24

Please sign in to comment.