{"push_id":686639626,"size":1,"distinct_size":1,"ref":"refs/heads/allow-view-specs-to-leverage-capybara-matchers","head":"8d290fdfcefdda75b6e353b664b5439fe409c61d","before":"eb16b1afd21477462c859e61f489989b1284b414","commits":[{"sha":"8d290fdfcefdda75b6e353b664b5439fe409c61d","author":{"email":"a39d36fb9932ae39da8d4e123d6ec22dba49dfc9@thoughtbot.com","name":"Joshua Clayton"},"message":"Allow RSpec view specs to leverage Capybara matchers\n\nCapybara provides a number of helpful matchers for asserting against a\nDOM structure with various selectors. RSpec's view specs focus on\nasserting against specific markup; this change ensures this is easier\nto do.\n\n    RSpec.describe \"todos/show.html.erb\", type: :view do\n      it \"displays the todo title\" do\n        assign :todo, instance_double(Todo, title: \"Buy milk\")\n\n        render\n\n        # without Capybara matchers - potentially ambiguous, doesn't\n        # test markup, only raw text rendered\n        expect(rendered).to contain \"Buy milk\"\n\n        # with Capybara matchers\n        expect(rendered).to have_css(\"header h1\", text: \"Buy milk\")\n      end\n    end","distinct":true,"url":"https://api.github.com/repos/joshuaclayton/capybara/commits/8d290fdfcefdda75b6e353b664b5439fe409c61d"}]}