Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: colszowka/simplecov
base: v0.5.1
...
head fork: colszowka/simplecov
compare: v0.5.2
  • 8 commits
  • 29 files changed
  • 0 commit comments
  • 2 contributors
Showing with 61 additions and 62 deletions.
  1. +10 −2 CHANGELOG.md
  2. +1 −1  README.rdoc
  3. +1 −2  features/config_adapters.feature
  4. +2 −3 features/config_autoload.feature
  5. +2 −3 features/config_command_name.feature
  6. +1 −2  features/config_coverage_dir.feature
  7. +2 −3 features/config_deactivate_merging.feature
  8. +2 −3 features/config_merge_timeout.feature
  9. +2 −4 features/config_project_name.feature
  10. +1 −2  features/config_styles.feature
  11. +1 −2  features/cucumber_basic.feature
  12. +2 −3 features/merging_test_unit_and_rspec.feature
  13. +1 −2  features/rspec_basic.feature
  14. +1 −2  features/rspec_groups_and_filters_basic.feature
  15. +1 −2  features/rspec_groups_and_filters_complex.feature
  16. +1 −4 features/rspec_without_simplecov.feature
  17. +23 −0 features/step_definitions/simplecov_steps.rb
  18. +1 −1  features/support/env.rb
  19. +1 −2  features/test_unit_basic.feature
  20. +1 −2  features/test_unit_groups_and_filters_basic.feature
  21. +1 −2  features/test_unit_groups_and_filters_complex.feature
  22. +1 −4 features/test_unit_without_simplecov.feature
  23. +0 −4 lib/simplecov.rb
  24. +1 −1  lib/simplecov/result_merger.rb
  25. +1 −1  lib/simplecov/version.rb
  26. +0 −1  test/faked_project/features/support/env.rb
  27. +0 −1  test/faked_project/spec/spec_helper.rb
  28. +0 −1  test/faked_project/test/test_helper.rb
  29. +0 −2  test/helper.rb
View
12 CHANGELOG.md
@@ -1,15 +1,23 @@
+v0.5.2 (2011-09-12)
+===================
+
+ * Another fix for a bug in JSON processing introduced with MultiJSON in 0.5.1
+ (see https://github.com/colszowka/simplecov/pull/75, thanks @sferik)
+
v0.5.1 (2011-09-12)
===================
+**Note: Yanked 2011-09-12 because the MultiJSON-patch had a crucial bug**
* Fix for invalid gemspec dependency string (see https://github.com/colszowka/simplecov/pull/70,
http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html, thanks @jspradlin)
* Added JSON in the form of the multi_json gem as dependency for those cases when built-in JSON
- is unavailable (see https://github.com/colszowka/simplecov/issues/72 and
- https://github.com/colszowka/simplecov/pull/74, thanks @sferik)
+ is unavailable (see https://github.com/colszowka/simplecov/issues/72
+ and https://github.com/colszowka/simplecov/pull/74, thanks @sferik)
v0.5.0 (2011-09-09)
===================
+**Note: Yanked 2011-09-09 because of trouble with the gemspec.**
* JSON is now used instead of YAML for resultset caching (used for merging). Should resolve
a lot of problems people used to have because of YAML parser errors.
View
2  README.rdoc
@@ -21,7 +21,7 @@ automatically when you launch SimpleCov. If you're curious, you can find it at h
Update your Gemfile with this and do a bundle install:
- gem 'simplecov', '>= 0.4.0', :require => false, :group => :test
+ gem 'simplecov', '>= 0.5.2', :require => false, :group => :test
Then, add the following to your test/test_helper.rb (right at the top, line 00) or spec_helper.rb or cucumber env.rb or whatever
test framework you prefer, really - just make sure simplecov is loaded and started BEFORE your app code is loaded:
View
3  features/config_adapters.feature
@@ -6,8 +6,7 @@ Feature:
that can be loaded at once.
Background:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
"""
View
5 features/config_autoload.feature
@@ -12,7 +12,6 @@ Feature:
by doing a 'require "simplecov"'
Scenario:
- Given I cd to "project"
Given a file named ".simplecov" with:
"""
SimpleCov.start do
@@ -20,11 +19,11 @@ Feature:
add_filter 'spec.rb'
end
"""
- And a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
"""
- And a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
"""
View
5 features/config_command_name.feature
@@ -7,15 +7,14 @@ Feature: Custom names for individual test suites
config can be given a custom command name using SimpleCov.command_name.
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
command_name "I'm in UR Unitz"
end
"""
- And a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
3  features/config_coverage_dir.feature
@@ -7,8 +7,7 @@ Feature:
in your project's root.
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
5 features/config_deactivate_merging.feature
@@ -9,15 +9,14 @@ Feature:
output directories instead (see SimpleCov.coverage_dir), but it is possible :)
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
use_merging false
end
"""
- And a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
5 features/config_merge_timeout.feature
@@ -13,15 +13,14 @@ Feature:
in the report.
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
merge_timeout 1
end
"""
- And a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
6 features/config_project_name.feature
@@ -5,11 +5,9 @@ Feature:
If this is not sufficient for you, you can specify a custom name using
SimpleCov.project_name('xyz')
- Background:
- Given I cd to "project"
Scenario: Guessed name
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start
@@ -19,7 +17,7 @@ Feature:
Then I should see "Code coverage for Project"
Scenario: Custom name
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start { project_name "Superfancy 2.0" }
View
3  features/config_styles.feature
@@ -6,8 +6,7 @@ Feature:
preference or project requirements.
Background:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
"""
View
3  features/cucumber_basic.feature
@@ -5,8 +5,7 @@ Feature:
the user a coverage report after running `cucumber features`
Scenario:
- Given I cd to "project"
- Given a file named "features/support/simplecov_config.rb" with:
+ Given SimpleCov for Cucumber is configured with:
"""
require 'simplecov'
SimpleCov.start
View
5 features/merging_test_unit_and_rspec.feature
@@ -6,8 +6,7 @@ Feature:
the joined results of all test suites that are using SimpleCov.
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
@@ -15,7 +14,7 @@ Feature:
add_filter 'spec.rb'
end
"""
- And a file named "spec/simplecov_config.rb" with:
+ And SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
3  features/rspec_basic.feature
@@ -5,8 +5,7 @@ Feature:
the user a coverage report after running `rspec`
Scenario:
- Given I cd to "project"
- Given a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start
View
3  features/rspec_groups_and_filters_basic.feature
@@ -5,8 +5,7 @@ Feature:
coverage report that respects those settings after running rspec
Scenario:
- Given I cd to "project"
- Given a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
3  features/rspec_groups_and_filters_complex.feature
@@ -7,8 +7,7 @@ Feature: Sophisticated grouping and filtering on RSpec
to specific groups.
Scenario:
- Given I cd to "project"
- Given a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
5 features/rspec_without_simplecov.feature
@@ -3,15 +3,12 @@ Feature:
Running specs without simplecov configuration
- Background:
- Given I cd to "project"
-
Scenario: No config at all
When I successfully run `bundle exec rspec spec`
Then no coverage report should have been generated
Scenario: Configured, but not started
- Given a file named "spec/simplecov_config.rb" with:
+ Given SimpleCov for RSpec is configured with:
"""
require 'simplecov'
SimpleCov.configure do
View
23 features/step_definitions/simplecov_steps.rb
@@ -1,3 +1,26 @@
+# Just a shortcut to make framework setup more readable
+# The test project is using separate config files to avoid specifying all of
+# test/spec_helper in the features every time.
+Given /^SimpleCov for (.*) is configured with:$/ do |framework, config_body|
+ framework_dir = case framework
+ when /RSpec/i
+ "spec"
+ when /Test\/Unit/i
+ "test"
+ when /Cucumber/i
+ "features/support"
+ else
+ raise ArgumentError, "Could not identify test framework #{framework}!"
+ end
+
+ steps %Q{
+ Given a file named "#{framework_dir}/simplecov_config.rb" with:
+ """
+ #{config_body}
+ """
+ }
+end
+
When /^I open the coverage report generated with `([^`]+)`$/ do |command|
steps %Q{
When I successfully run `#{command}`
View
2  features/support/env.rb
@@ -3,7 +3,6 @@
exit 0
end
-require 'rubygems'
require 'bundler'
Bundler.setup
require 'aruba/cucumber'
@@ -23,4 +22,5 @@
FileUtils.rm_rf 'project'
FileUtils.cp_r File.join(this_dir, '../../test/faked_project/'), 'project'
end
+ Given 'I cd to "project"'
end
View
3  features/test_unit_basic.feature
@@ -5,8 +5,7 @@ Feature:
the user a coverage report after running `rake test`
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start
View
3  features/test_unit_groups_and_filters_basic.feature
@@ -5,8 +5,7 @@ Feature:
coverage report that respects those settings after running tests
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
3  features/test_unit_groups_and_filters_complex.feature
@@ -7,8 +7,7 @@ Feature: Sophisticated grouping and filtering on Test/Unit
to specific groups.
Scenario:
- Given I cd to "project"
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.start do
View
5 features/test_unit_without_simplecov.feature
@@ -3,15 +3,12 @@ Feature:
Running unit tests without simplecov configuration
- Background:
- Given I cd to "project"
-
Scenario: No config at all
When I successfully run `bundle exec rake test`
Then no coverage report should have been generated
Scenario: Configured, but not started
- Given a file named "test/simplecov_config.rb" with:
+ Given SimpleCov for Test/Unit is configured with:
"""
require 'simplecov'
SimpleCov.configure do
View
4 lib/simplecov.rb
@@ -1,5 +1,3 @@
-require 'rubygems'
-
#
# Code coverage for ruby 1.9. Please check out README for a full introduction.
#
@@ -119,7 +117,5 @@ def usable?
require 'simplecov/command_guesser'
require 'simplecov/version'
-autoload :JSON, 'json'
-
# Load default config
require 'simplecov/defaults'
View
2  lib/simplecov/result_merger.rb
@@ -71,7 +71,7 @@ def store_result(result)
if defined? ::JSON
f.puts JSON.pretty_generate(new_set)
else
- f.puts new_set
+ f.puts MultiJson.encode(new_set)
end
end
true
View
2  lib/simplecov/version.rb
@@ -1,3 +1,3 @@
module SimpleCov
- VERSION = "0.5.1"
+ VERSION = "0.5.2"
end
View
1  test/faked_project/features/support/env.rb
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'bundler/setup'
# We're injecting simplecov_config via aruba in cucumber here
View
1  test/faked_project/spec/spec_helper.rb
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'bundler/setup'
# We're injecting simplecov_config via aruba in cucumber here
View
1  test/faked_project/test/test_helper.rb
@@ -1,4 +1,3 @@
-require 'rubygems'
require 'bundler/setup'
# We're injecting simplecov_config via aruba in cucumber here
View
2  test/helper.rb
@@ -1,7 +1,5 @@
-require 'rubygems'
require 'bundler/setup'
require 'simplecov'
-
require 'test/unit'
require 'shoulda'

No commit comments for this range

Something went wrong with that request. Please try again.