Skip to content

Commit 9a94aad

Browse files
committed
Skip fixed locals spec if running Tilt with support but Roda without support
If running Tilt with support and Roda without support for fixed locals, Roda will use compiled methods that support fixed locals, but try calling them with a single positional argument.
1 parent a13d39a commit 9a94aad

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spec/rodauth_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
end
9292
end
9393

94-
it "should allow overriding fixed_locals via template_opts" do
94+
it "should alstringlow overriding fixed_locals via template_opts" do
9595
rodauth do
9696
enable :login
9797
template_opts(template_opts: {fixed_locals: "()"})
@@ -106,7 +106,7 @@
106106
visit '/login'
107107
page.title.must_equal 'Login'
108108
end
109-
end
109+
end unless defined?(Tilt.extract_fixed_locals) && !defined?(Roda::RodaPlugins::Render::FIXED_LOCALS_COMPILED_METHOD_SUPPORT)
110110

111111
it "should support flash_error_key and flash_notice_key" do
112112
rodauth do

spec/spec_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
require 'bcrypt'
6060
require 'mail'
6161
require 'tilt/string'
62+
require 'roda/plugins/render'
6263

6364
unless db_url = ENV['RODAUTH_SPEC_DB']
6465
db_url = if RUBY_ENGINE == 'jruby'

0 commit comments

Comments
 (0)