From 61fbed9622061412f1a7ca5fe2172ca14fafc9fa Mon Sep 17 00:00:00 2001 From: Chris Welham <71787007+apexatoll@users.noreply.github.com> Date: Sun, 24 Sep 2023 23:13:54 +0100 Subject: [PATCH] Create kanagru initialised shared context --- spec/support/contexts/kangaru_initialised.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 spec/support/contexts/kangaru_initialised.rb diff --git a/spec/support/contexts/kangaru_initialised.rb b/spec/support/contexts/kangaru_initialised.rb new file mode 100644 index 0000000..e97952d --- /dev/null +++ b/spec/support/contexts/kangaru_initialised.rb @@ -0,0 +1,11 @@ +RSpec.shared_context :kangaru_initialised do + before do + gem.main_file.write(<<~RUBY) + require "kangaru" + + module SomeGem + extend Kangaru::Initialiser + end + RUBY + end +end