Move build badge specs to badges directory

This commit is contained in:
Grzegorz Bizon 2016-02-10 12:20:01 +01:00
parent 28b11963b1
commit debaa81329
2 changed files with 3 additions and 6 deletions

View File

@ -1,4 +1,4 @@
Feature: Project Builds Badge
Feature: Project Badges Build
Background:
Given I sign in as a user
And I own a project

View File

@ -1,4 +1,4 @@
class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedBuilds
@ -20,11 +20,8 @@ class Spinach::Features::ProjectBuildsBadge < Spinach::FeatureSteps
expect_badge('running')
end
def svg
Nokogiri::HTML.parse(page.body)
end
def expect_badge(status)
svg = Nokogiri::HTML.parse(page.body)
expect(page.response_headers).to include('Content-Type' => 'image/svg+xml')
expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy
end