Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

First draft at some cucumber features

  • Loading branch information...
commit b85a5d780e7641dc22e41c92aa4ed8c3b8b4b5ce 1 parent fbcda68
Nick Quaranto qrush authored
45 features/grading_projects.feature
... ... @@ -0,0 +1,45 @@
  1 +Feature: Grading projects
  2 + As a programmer who is concerned about quality
  3 + I want to be able to find out details metrics about my application
  4 + In order to improve it and make it awesome
  5 +
  6 + Scenario: Grading public projects
  7 + Given I have integrity setup in the "integrity" folder
  8 + And I have a public integrity project called "factory_girl"
  9 + And I have a public integrity project called "clearance"
  10 + And I have a configuration file with "url" set to "http://metrics.thoughtbot.com"
  11 + And I have a configuration file with "integrity_config" set to "integrity/config.yml"
  12 + And I have a configuration file with "site" set to "_site"
  13 +
  14 + When I run "rake grade"
  15 +
  16 + Then the "_site/index.html" file should exist
  17 + And I should see "factory_girl" in "_site/index.html"
  18 + And I should see "clearance" in "_site/index.html"
  19 + And I should see "http://metrics.thoughtbot.com" in "_site/index.html"
  20 + And the "_site/clearance/output" directory should exist
  21 + And the "_site/factory_girl/output" directory should exist
  22 + And the template files should exist in "_site"
  23 +
  24 + Scenario: Grading public and private projects
  25 + Given I have integrity setup in the "integrity" folder
  26 + And I have a public integrity project called "factory_girl"
  27 + And I have a public integrity project called "clearance"
  28 + And I have a private integrity project called "paperclip"
  29 + And I have a configuration file with "url" set to "http://metrics.thoughtbot.com"
  30 + And I have a configuration file with "integrity_config" set to "integrity/config.yml"
  31 + And I have a configuration file with "site" set to "_site"
  32 +
  33 + When I run "rake grade"
  34 +
  35 + Then the "_site/index.html" file should exist
  36 + And I should see "factory_girl" in "_site/index.html"
  37 + And I should see "clearance" in "_site/index.html"
  38 + And I should see "http://metrics.thoughtbot.com" in "_site/index.html"
  39 + And the "_site/clearance/output" directory should exist
  40 + And the "_site/factory_girl/output" directory should exist
  41 + And the "_site/private/index.html" file should exist
  42 + And I should see "paperclip" in "_site/private/index.html"
  43 + And I should see "http://metrics.thoughtbot.com" in "_site/private/index.html"
  44 + And the "_site/private/paperclip/output" directory should exist
  45 + And the template files should exist in "_site"
17 features/support/env.rb
... ... @@ -0,0 +1,17 @@
  1 +require 'test/unit'
  2 +
  3 +TEST_DIR = File.join('/', 'tmp', 'report_card')
  4 +
  5 +World do
  6 + include Test::Unit::Assertions
  7 +end
  8 +
  9 +Before do
  10 + FileUtils.mkdir(TEST_DIR)
  11 + Dir.chdir(TEST_DIR)
  12 +end
  13 +
  14 +After do
  15 + Dir.chdir(TEST_DIR)
  16 + FileUtils.rm_rf(TEST_DIR)
  17 +end
1  lib/report_card.rb
... ... @@ -1,5 +1,6 @@
1 1 $:.unshift(File.dirname(__FILE__))
2 2
  3 +gem 'integrity', '0.1.9.3'
3 4 require 'integrity'
4 5 require 'metric_fu'
5 6 require 'tinder'

0 comments on commit b85a5d7

Please sign in to comment.
Something went wrong with that request. Please try again.