Add rcov task
This commit is contained in:
parent
0cb218bba0
commit
68f0f7ec21
6 changed files with 14 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -20,6 +20,7 @@ public/stylesheets/*.css
|
||||||
public/diaspora
|
public/diaspora
|
||||||
spec/fixtures/*.y*ml
|
spec/fixtures/*.y*ml
|
||||||
spec/fixtures/*.fixture.*
|
spec/fixtures/*.fixture.*
|
||||||
|
coverage/*
|
||||||
|
|
||||||
# Uploded files and local files
|
# Uploded files and local files
|
||||||
public/uploads/*
|
public/uploads/*
|
||||||
|
|
|
||||||
1
Gemfile
1
Gemfile
|
|
@ -76,6 +76,7 @@ group :test do
|
||||||
gem 'cucumber-rails', '0.3.2'
|
gem 'cucumber-rails', '0.3.2'
|
||||||
gem 'rspec', '>= 2.0.0'
|
gem 'rspec', '>= 2.0.0'
|
||||||
gem 'rspec-rails', '>= 2.0.0'
|
gem 'rspec-rails', '>= 2.0.0'
|
||||||
|
gem 'rcov'
|
||||||
gem 'database_cleaner', '0.6.0'
|
gem 'database_cleaner', '0.6.0'
|
||||||
gem 'webmock', :require => false
|
gem 'webmock', :require => false
|
||||||
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
|
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,7 @@ GEM
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (~> 0.14.4)
|
thor (~> 0.14.4)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
|
rcov (0.9.9)
|
||||||
redis (2.1.1)
|
redis (2.1.1)
|
||||||
redis-namespace (0.8.0)
|
redis-namespace (0.8.0)
|
||||||
redis (< 3.0.0)
|
redis (< 3.0.0)
|
||||||
|
|
@ -421,6 +422,7 @@ DEPENDENCIES
|
||||||
nokogiri (= 1.4.3.1)
|
nokogiri (= 1.4.3.1)
|
||||||
omniauth (= 0.1.6)
|
omniauth (= 0.1.6)
|
||||||
rails (= 3.0.3)
|
rails (= 3.0.3)
|
||||||
|
rcov
|
||||||
resque (= 1.10.0)
|
resque (= 1.10.0)
|
||||||
rest-client (= 1.6.1)
|
rest-client (= 1.6.1)
|
||||||
roxml!
|
roxml!
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ task :stats => "spec:statsetup"
|
||||||
desc "Run all specs in spec directory (excluding plugin specs)"
|
desc "Run all specs in spec directory (excluding plugin specs)"
|
||||||
RSpec::Core::RakeTask.new(:spec => spec_prereq)
|
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
|
namespace :"spec --color" do
|
||||||
[:requests, :models, :controllers, :views, :helpers, :mailers, :lib].each do |sub|
|
[:requests, :models, :controllers, :views, :helpers, :mailers, :lib].each do |sub|
|
||||||
desc "Run the code examples in spec/#{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 << "Routing specs" if File.exist?('spec/routing')
|
||||||
::CodeStatistics::TEST_TYPES << "Request specs" if File.exist?('spec/requests')
|
::CodeStatistics::TEST_TYPES << "Request specs" if File.exist?('spec/requests')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,15 @@
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
# licensed under the Affero General Public License version 3 or later. See
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
describe 'making sure the config is parsed as should' do
|
describe 'making sure the config is parsed as should' do
|
||||||
|
|
||||||
describe 'pod_url' do
|
describe 'pod_url' do
|
||||||
it 'should have a trailing slash' do
|
it 'should have a trailing slash' do
|
||||||
AppConfig[:pod_url].should == 'http://example.org/'
|
AppConfig[:pod_url].should == 'http://example.org/'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'terse_pod_url'
|
describe 'terse_pod_url'
|
||||||
it 'should be correctly parsed' do
|
it 'should be correctly parsed' do
|
||||||
AppConfig[:pod_uri].host.should == 'example.org'
|
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 File.join(File.dirname(__FILE__), '..', 'config', 'environment') unless defined?(Rails)
|
||||||
require 'helper_methods'
|
require 'helper_methods'
|
||||||
require 'rspec/rails'
|
require 'rspec/rails'
|
||||||
|
puts require 'rspec'
|
||||||
require 'webmock/rspec'
|
require 'webmock/rspec'
|
||||||
require 'factory_girl'
|
require 'factory_girl'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue