From 7d04f480b9fc71e70fae5bdaafdbf22907d0aa20 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 29 Oct 2009 09:57:05 -0700 Subject: [PATCH] Make the stats scenario pass now that it's real. --- features/command_line.feature | 9 +++++---- features/step_definitions/command_line_steps.rb | 7 ++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/features/command_line.feature b/features/command_line.feature index 782fdd86..b77b0912 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -210,8 +210,9 @@ Feature: Command Line Given I am using the existing project in test/fixtures/stylesheets/compass When I run: compass stats Then I am told statistics for each file: - | filename | lines | mixins | selectors | properties | - | src/screen.sass | 22 | 1 | 134 | 1,320 | - | src/print.sass | 22 | 1 | 134 | 1,320 | - | src/ie.sass | 22 | 1 | 134 | 1,320 | + | Filename | Rules | Properties | Mixins Defs | Mixins Used | + | sass/layout.sass | 0 | 0 | 0 | 1 | + | sass/print.sass | 0 | 0 | 0 | 2 | + | sass/reset.sass | 4 | 1 | 0 | 2 | + | sass/utilities.sass | 2 | 0 | 0 | 2 | diff --git a/features/step_definitions/command_line_steps.rb b/features/step_definitions/command_line_steps.rb index c830a883..3879d44b 100644 --- a/features/step_definitions/command_line_steps.rb +++ b/features/step_definitions/command_line_steps.rb @@ -182,5 +182,10 @@ end Then /^I am told statistics for each file:$/ do |table| # table is a Cucumber::Ast::Table - pending + table.raw.each do |row| + re = Regexp.new row.join(' *\| *') + @last_result.should =~ re + end end + +