Skip to content

Commit

Permalink
Make capybara optional
Browse files Browse the repository at this point in the history
  • Loading branch information
elct9620 committed Dec 18, 2023
1 parent 18af2d5 commit 236ab8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/hanami/cucumber/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ def boot
ENV["HANAMI_ENV"] ||= "test"
require "hanami/prepare"
require_relative "support/world"
require_relative "support/capybara"
require_relative "support/capybara" if capybara?
end

def from_cucumber?
caller.detect { |f| f.include? "/env.rb:" }
end

def capybara?
Gem.loaded_specs.include?("capybara")
end
end
end
end

0 comments on commit 236ab8a

Please sign in to comment.