This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
red > green features setup rcov + cucumber/rspec rake tasks
- Loading branch information
Jeremiah Heller
committed
May 5, 2011
1 parent
78978e7
commit e067fb5
Showing
16 changed files
with
168 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ coverage/ | |
.rvmrc | ||
public/files | ||
public/blog_post_assets/ | ||
cuc_coverage/ | ||
coverage.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Then /^the post "([^"]*)" should be (private|public)$/ do |title, expected| | ||
Blog::Post.find_by_title(title).published.should eq (expected == 'public') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
task :cleanup_rcov_files do | ||
rm_rf 'coverage.data' | ||
end | ||
|
||
namespace :spec do | ||
task(:rcov).clear_prerequisites.clear_actions | ||
desc "Run all examples using rcov" | ||
RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t| | ||
t.rcov = true | ||
t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features,spec/*"] | ||
t.rcov_opts << %[ --sort coverage --aggregate coverage.data --rails] | ||
end | ||
end | ||
|
||
namespace :cucumber do | ||
task(:rcov).clear_prerequisites.clear_actions | ||
desc "Run cucumber features using rcov" | ||
Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t| | ||
t.cucumber_opts = %w{--format progress} | ||
t.rcov = true | ||
t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features,spec/*"] | ||
t.rcov_opts << %[ --sort coverage --aggregate coverage.data --rails] | ||
t.rcov_opts << %[ --output #{Rails.root}/cuc_coverage] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
published_post: | ||
id: <%= Fixtures.identify :published_post %> | ||
title: Published Post | ||
body: "Unquestionably the biggest challenge facing any organization today is effectively locating, managing and analysing the constant stream of data." | ||
author_id: <%= Fixtures.identify :john %> | ||
published: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters