diff --git a/features/step_definitions/generic_steps.rb b/features/step_definitions/generic_steps.rb new file mode 100644 index 00000000..64a6a267 --- /dev/null +++ b/features/step_definitions/generic_steps.rb @@ -0,0 +1,7 @@ +Then "the badge should show (.*)" do |number| + badge = -1 + response.should have_xpath("//span[@id='badge_count']") do |node| + badge = node.first.content.to_i + end + badge.should == number.to_i +end diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb new file mode 100644 index 00000000..585dcfe8 --- /dev/null +++ b/features/step_definitions/project_steps.rb @@ -0,0 +1,4 @@ +When /^I visit the "([^\"]*)" project$/ do |project_name| + project = Project.find_by_name(project_name) + visit project_path(project) +end