Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rspec/rspec-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.1
Choose a base ref
...
head repository: rspec/rspec-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.0
Choose a head ref
Loading
Showing with 1,762 additions and 872 deletions.
  1. +8 −3 Gemfile
  2. +5 −0 Guardfile
  3. +35 −4 History.markdown
  4. +10 −3 README.markdown
  5. +12 −13 Rakefile
  6. +175 −121 Upgrade.markdown
  7. +13 −0 bin/autospec
  8. +24 −1 bin/rspec
  9. +3 −1 features/command_line/line_number_appended_to_path.feature
  10. +3 −1 features/command_line/line_number_option.feature
  11. +74 −0 features/command_line/tag.feature
  12. +1 −1 features/filtering/exclusion_filters.feature
  13. +166 −0 features/filtering/implicit_filters.feature
  14. +51 −44 features/hooks/around_hooks.feature
  15. +0 −26 features/hooks/halt.feature
  16. +3 −0 features/metadata/described_class.feature
  17. +76 −0 features/pending/pending_examples.feature
  18. +11 −0 features/step_definitions/additional_cli_steps.rb
  19. +8 −0 features/subject/attribute_of_subject.feature
  20. +8 −13 features/subject/explicit_subject.feature
  21. +29 −0 features/subject/implicit_receiver.feature
  22. +6 −7 features/subject/implicit_subject.feature
  23. +3 −21 lib/rspec/core.rb
  24. +22 −3 lib/rspec/core/backward_compatibility.rb
  25. +1 −0 lib/rspec/core/command_line.rb
  26. +34 −6 lib/rspec/core/configuration.rb
  27. +1 −3 lib/rspec/core/configuration_options.rb
  28. +0 −5 lib/rspec/core/example.rb
  29. +9 −8 lib/rspec/core/example_group.rb
  30. +11 −0 lib/rspec/core/expecting/with_rspec.rb
  31. +1 −1 lib/rspec/core/extensions/object.rb
  32. +1 −6 lib/rspec/core/formatters/base_formatter.rb
  33. +1 −1 lib/rspec/core/hooks.rb
  34. +15 −5 lib/rspec/core/metadata.rb
  35. +17 −0 lib/rspec/core/option_parser.rb
  36. +10 −1 lib/rspec/core/pending.rb
  37. +32 −10 lib/rspec/core/rake_task.rb
  38. +1 −0 lib/rspec/core/reporter.rb
  39. +58 −59 lib/rspec/core/subject.rb
  40. +1 −1 lib/rspec/core/version.rb
  41. +9 −4 lib/rspec/core/world.rb
  42. +4 −11 rspec-core.gemspec
  43. +16 −5 spec/rspec/core/command_line_spec.rb
  44. +6 −0 spec/rspec/core/configuration_options_spec.rb
  45. +89 −6 spec/rspec/core/configuration_spec.rb
  46. +17 −1 spec/rspec/core/deprecations_spec.rb
  47. +29 −14 spec/rspec/core/example_group_spec.rb
  48. +0 −7 spec/rspec/core/example_spec.rb
  49. +49 −33 spec/rspec/core/formatters/html_formatted-1.8.6.html
  50. +5 −5 spec/rspec/core/formatters/html_formatted-1.8.7.html
  51. +46 −26 spec/rspec/core/formatters/html_formatted-1.9.1.html
  52. +5 −5 spec/rspec/core/formatters/html_formatted-1.9.2.html
  53. +49 −33 spec/rspec/core/formatters/text_mate_formatted-1.8.6.html
  54. +19 −19 spec/rspec/core/formatters/text_mate_formatted-1.8.7.html
  55. +56 −33 spec/rspec/core/formatters/text_mate_formatted-1.9.1.html
  56. +26 −38 spec/rspec/core/formatters/text_mate_formatted-1.9.2.html
  57. +153 −132 spec/rspec/core/metadata_spec.rb
  58. +133 −25 spec/rspec/core/pending_example_spec.rb
  59. +25 −32 spec/rspec/core/rake_task_spec.rb
  60. +15 −0 spec/rspec/core/subject_spec.rb
  61. +72 −61 spec/rspec/core/world_spec.rb
  62. +0 −14 spec/spec_helper.rb
11 changes: 8 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
source "http://rubygems.org"

%w[rspec-core rspec-expectations rspec-mocks].each do |lib|
gem lib, :path => File.expand_path("../../#{lib}", __FILE__)
end

gem "rake"
gem "cucumber", "0.8.5"
gem "aruba", "0.2.2"
@@ -11,9 +15,10 @@ gem "rr"
gem "flexmock"
gem "nokogiri"
gem "syntax"
gem "rspec-core", :path => "."
gem "rspec-expectations", :path => "../rspec-expectations"
gem "rspec-mocks", :path => "../rspec-mocks"
gem "relish", "~> 0.0.3"
gem "guard-rspec"
gem "growl"
gem "rb-fsevent"

unless RUBY_PLATFORM == "java"
gem "ruby-prof"
5 changes: 5 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
guard 'rspec', :version => 2 do
watch('^spec/(.*)_spec.rb')
watch('^lib/(.*)\.rb') { |m| "spec/#{m[1]}_spec.rb" }
watch('^spec/spec_helper.rb') { "spec" }
end
39 changes: 35 additions & 4 deletions History.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
## rspec-core release history (incomplete)

### 2.0.1 / in development
### 2.1.0 / 2010-11-07

[full changelog](http://github.com/rspec/rspec-core/compare/v2.0.1...v2.1.0)

* Enhancments
* Add skip_bundler option to rake task to tell rake task to ignore the
presence of a Gemfile (jfelchner)
* Add gemfile option to rake task to tell rake task what Gemfile to look
for (defaults to 'Gemfile')
* Allow passing caller trace into Metadata to support extensions (Glenn
Vanderburg)
* Add deprecation warning for Spec::Runner.configure to aid upgrade from
RSpec-1
* Add deprecated Spec::Rake::SpecTask to aid upgrade from RSpec-1
* Add 'autospec' command with helpful message to aid upgrade from RSpec-1
* Add support for filtering with tags on CLI (Lailson Bandeira)
* Add a helpful message about RUBYOPT when require fails in bin/rspec
(slyphon)
* Add "-Ilib" to the default rcov options (Tianyi Cui)
* Make the expectation framework configurable (default rspec, of course)
(Justin Ko)
* Add 'pending' to be conditional (Myron Marston)
* Add explicit support for :if and :unless as metadata keys for conditional run
of examples (Myron Marston)
* Add --fail-fast command line option (Jeff Kreeftmeijer)

[full changelog](http://github.com/rspec/rspec-core/compare/v2.0.0...master)
* Bug fixes
* Eliminate stack overflow with "subject { self }"
* Require 'rspec/core' in the Raketask (ensures it required when running rcov)

### 2.0.1 / 2010-10-18

[full changelog](http://github.com/rspec/rspec-core/compare/v2.0.0...v2.0.1)

* Bug fixes
* restore color when using spork + autotest
* Restore color when using spork + autotest
* Pending examples without docstrings render the correct message (Josep M. Bach)
* Fixed bug where a failure in a spec file ending in anything but _spec.rb would
fail in a confusing way.
* Support backtrace lines from erb templates in html formatter (Alex Crichton)

### 2.0.0 / 2010-10-10

@@ -27,7 +58,7 @@

* Enhancements
* implicitly require unknown formatters so you don't have to require the
file explicitly on the commmand line (Michael Grosser)
file explicitly on the commmand line (Michael Grosser)
* add --out/-o option to assign output target
* added fail_fast configuration option to abort on first failure
* support a Hash subject (its([:key]) { should == value }) (Josep M. Bach)
13 changes: 10 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -2,13 +2,20 @@

Behaviour Driven Development for Ruby

## Upgrading from rspec-1.x
## Documentation

See [Upgrade.markdown](http://github.com/rspec/rspec-core/blob/master/Upgrade.markdown)
* [Cucumber features](http://relishapp.com/rspec/rspec-core/v/2-0)
* [RDoc](http://rubydoc.info/gems/rspec-core/2.0.1/frames)

## Install

gem install rspec -v 2.0.0
gem install rspec # for rspec-core, rspec-expectations, rspec-mocks
gem install rspec-core # for rspec-core only

## Upgrading from rspec-1.x

See [Upgrade.markdown](http://github.com/rspec/rspec-core/blob/master/Upgrade.markdown)


This will install the rspec, rspec-core, rspec-expectations and rspec-mocks
gems.
25 changes: 12 additions & 13 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -18,10 +18,6 @@ class Cucumber::Rake::Task::ForkedCucumberRunner
end
end

task :cleanup_rcov_files do
rm_rf 'coverage.data'
end

desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_path = 'bin/rspec'
@@ -30,25 +26,28 @@ end

Cucumber::Rake::Task.new(:cucumber)

namespace :spec do
desc "Run all examples using rcov"
RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
namespace :rcov do
task :cleanup do
rm_rf 'coverage.data'
end

RSpec::Core::RakeTask.new :spec do |t|
t.rcov = true
t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
t.rcov_opts << %[--no-html --aggregate coverage.data]
end
end

namespace :cucumber do
desc "Run cucumber features using rcov"
Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
Cucumber::Rake::Task.new :cucumber do |t|
t.cucumber_opts = %w{--format progress}
t.rcov = true
t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
end

end

task :rcov => ["rcov:cleanup", "rcov:spec", "rcov:cucumber"]

task :default => [:spec, :cucumber]

task :clobber do
@@ -60,7 +59,7 @@ end
desc "Push cukes to relishapp using the relish-client-gem"
task :relish, :version do |t, args|
raise "rake relish[VERSION]" unless args[:version]
sh "bundle exec relish --organization rspec --project rspec-core -v #{args[:version]} push"
sh "relish push --organization rspec --project rspec-core -v #{args[:version]}"
end

Rake::RDocTask.new do |rdoc|
Loading