classSpinach::Features::ProjectBuildsBadge<Spinach::FeatureStepsincludeSharedProjectincludeSharedBuildsincludeRepoHelpersstep'I display builds badge for a master branch'dovisitbadge_namespace_project_builds_path(@project.namespace,@project,ref: :master,format: :svg)endstep'I should see a build success badge'doexpect(svg.at('text:contains("success")')).tobe_truthyendstep'I should see a build failed badge'doexpect(svg.at('text:contains("failed")')).tobe_truthyendstep'build badge is a svg image'doexpect(page.response_headers).toinclude('Content-Type'=>'image/svg+xml')enddefsvgNokogiri::HTML.parse(page.body)endend