Commit 68f0f7ec authored by Raphael Sofaer's avatar Raphael Sofaer

Add rcov task

parent 0cb218bb
......@@ -20,6 +20,7 @@ public/stylesheets/*.css
public/diaspora
spec/fixtures/*.y*ml
spec/fixtures/*.fixture.*
coverage/*
# Uploded files and local files
public/uploads/*
......
......@@ -76,6 +76,7 @@ group :test do
gem 'cucumber-rails', '0.3.2'
gem 'rspec', '>= 2.0.0'
gem 'rspec-rails', '>= 2.0.0'
gem 'rcov'
gem 'database_cleaner', '0.6.0'
gem 'webmock', :require => false
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
......
......@@ -306,6 +306,7 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rcov (0.9.9)
redis (2.1.1)
redis-namespace (0.8.0)
redis (< 3.0.0)
......@@ -421,6 +422,7 @@ DEPENDENCIES
nokogiri (= 1.4.3.1)
omniauth (= 0.1.6)
rails (= 3.0.3)
rcov
resque (= 1.10.0)
rest-client (= 1.6.1)
roxml!
......
......@@ -39,6 +39,11 @@ task :stats => "spec:statsetup"
desc "Run all specs in spec directory (excluding plugin specs)"
RSpec::Core::RakeTask.new(:spec => spec_prereq)
desc "Run the specs with rcov"
Rspec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
t.rcov = true
t.rcov_opts = ['-Ispec', '--exclude', 'spec', '--exclude', 'gems']
end
namespace :"spec --color" do
[:requests, :models, :controllers, :views, :helpers, :mailers, :lib].each do |sub|
desc "Run the code examples in spec/#{sub}"
......@@ -66,5 +71,6 @@ namespace :"spec --color" do
::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
::CodeStatistics::TEST_TYPES << "Request specs" if File.exist?('spec/requests')
end
end
......@@ -2,14 +2,15 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe 'making sure the config is parsed as should' do
describe 'pod_url' do
it 'should have a trailing slash' do
AppConfig[:pod_url].should == 'http://example.org/'
end
end
describe 'terse_pod_url'
it 'should be correctly parsed' do
AppConfig[:pod_uri].host.should == 'example.org'
......
......@@ -8,6 +8,7 @@ ENV["RAILS_ENV"] ||= 'test'
require File.join(File.dirname(__FILE__), '..', 'config', 'environment') unless defined?(Rails)
require 'helper_methods'
require 'rspec/rails'
puts require 'rspec'
require 'webmock/rspec'
require 'factory_girl'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment