Commit 4474167
Changed files (2)
spec
features
spec/features/gyms_spec.rb
@@ -38,7 +38,6 @@ feature "Gyms", type: :feature do
it "returns gyms that match the search criteria", js: true do
subject.visit_page
- puts subject.pretty_print
subject.search("sait")
expect(subject).to be_on_page
spec/rails_helper.rb
@@ -65,4 +65,10 @@ RSpec.configure do |config|
config.after(:each) do
DatabaseCleaner.clean
end
+
+ config.after(:each) do |example|
+ if example.metadata[:type] == :feature && example.exception.present?
+ puts subject.pretty_print
+ end
+ end
end