Skip to content

Commit

Permalink
Merge pull request #183 from esquinas/fix-readme-shared-context-code-…
Browse files Browse the repository at this point in the history
…given-for-testing

doc: fix README shared_context code given for testing
  • Loading branch information
straydogstudio authored Jul 23, 2024
2 parents 5e14d6a + b639b59 commit 1472939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ RSpec.shared_context 'axlsx' do
# mimics an ActionView::Template class, presenting a 'source' method
# to retrieve the content of the template
filename = Rails.root.join(*template_path).to_s
source = Struct.new(:source).new(File.read(filename))
axlsx_binding.eval(ActionView::Template::Handlers::AxlsxBuilder.new.call(source), filename)
template = Struct.new(:source).new(File.read(filename))
axlsx_binding.eval(AxlsxRails::TemplateHandler.new.call(template), filename)
axlsx_binding.local_variable_get(:wb)
end
end
Expand Down

0 comments on commit 1472939

Please sign in to comment.