Skip to content

Commit

Permalink
Only take screenshots for features tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez authored and mattheworiordan committed May 4, 2018
1 parent e77fc60 commit 0b75295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara-screenshot/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def failed?(example)
Capybara::Screenshot.final_session_name = nil
end

config.after do |example_from_block_arg|
config.after(type: :feature) do |example_from_block_arg|
# RSpec 3 no longer defines `example`, but passes the example as block argument instead
example = config.respond_to?(:expose_current_running_example_as) ? example_from_block_arg : self.example

Expand Down

0 comments on commit 0b75295

Please sign in to comment.