rspec-core 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.markdown +10 -0
 - data/Upgrade.markdown +2 -2
 - data/lib/autotest/rspec2.rb +1 -1
 - data/lib/rspec/core/configuration.rb +15 -5
 - data/lib/rspec/core/extensions/kernel.rb +3 -23
 - data/lib/rspec/core/version.rb +1 -1
 - data/spec/autotest/rspec_spec.rb +6 -0
 - data/spec/rspec/core/configuration_spec.rb +10 -3
 - data/spec/rspec/core/kernel_extensions_spec.rb +3 -6
 - metadata +6 -6
 
    
        data/History.markdown
    CHANGED
    
    | 
         @@ -1,5 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ## rspec-core release history (incomplete)
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ### 2.2.1 / in development
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            [full changelog](http://github.com/rspec/rspec-core/compare/v2.2.0...master)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            * Bug fixes
         
     | 
| 
      
 8 
     | 
    
         
            +
              * alias_method instead of override Kernel#method_missing (John Wilger)
         
     | 
| 
      
 9 
     | 
    
         
            +
              * changed --autotest to --tty in generated command (MIKAMI Yoshiyuki) 
         
     | 
| 
      
 10 
     | 
    
         
            +
              * revert change to debugger (had introduced conflict with Rails)
         
     | 
| 
      
 11 
     | 
    
         
            +
                * also restored --debugger/-debug option
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       3 
13 
     | 
    
         
             
            ### 2.2.0 / 2010-11-28
         
     | 
| 
       4 
14 
     | 
    
         | 
| 
       5 
15 
     | 
    
         
             
            [full changelog](http://github.com/rspec/rspec-core/compare/v2.1.0...v2.2.0)
         
     | 
    
        data/Upgrade.markdown
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # rspec-core-2.2 
     | 
| 
      
 1 
     | 
    
         
            +
            # rspec-core-2.2
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            ## FASTER!
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
         @@ -94,7 +94,7 @@ JRuby installation to a newer release that allows the example to pass, RSpec 
     | 
|
| 
       94 
94 
     | 
    
         
             
            will report it as a failure (`Expected pending '...' to fail.  No Error was raised.`),
         
     | 
| 
       95 
95 
     | 
    
         
             
            so that know that you can remove the call to `pending`.
         
     | 
| 
       96 
96 
     | 
    
         | 
| 
       97 
     | 
    
         
            -
            # rspec-core-2.0
         
     | 
| 
      
 97 
     | 
    
         
            +
            # New features in rspec-core-2.0
         
     | 
| 
       98 
98 
     | 
    
         | 
| 
       99 
99 
     | 
    
         
             
            ### Runner
         
     | 
| 
       100 
100 
     | 
    
         | 
    
        data/lib/autotest/rspec2.rb
    CHANGED
    
    | 
         @@ -41,7 +41,7 @@ class Autotest::Rspec2 < Autotest 
     | 
|
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
              def make_test_cmd(files_to_test)
         
     | 
| 
       43 
43 
     | 
    
         
             
                files_to_test.empty? ? '' :
         
     | 
| 
       44 
     | 
    
         
            -
                  "#{bundle_exec}#{ruby} #{require_rubygems}-S #{SPEC_PROGRAM} -- 
     | 
| 
      
 44 
     | 
    
         
            +
                  "#{bundle_exec}#{ruby} #{require_rubygems}-S #{SPEC_PROGRAM} --tty #{normalize(files_to_test).keys.flatten.map { |f| "'#{f}'"}.join(' ')}"
         
     | 
| 
       45 
45 
     | 
    
         
             
              end
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
47 
     | 
    
         
             
              def bundle_exec
         
     | 
| 
         @@ -176,11 +176,21 @@ module RSpec 
     | 
|
| 
       176 
176 
     | 
    
         
             
                  end
         
     | 
| 
       177 
177 
     | 
    
         | 
| 
       178 
178 
     | 
    
         
             
                  def debug=(bool)
         
     | 
| 
       179 
     | 
    
         
            -
                     
     | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
     | 
    
         
            -
             
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
      
 179 
     | 
    
         
            +
                    return unless bool
         
     | 
| 
      
 180 
     | 
    
         
            +
                    begin
         
     | 
| 
      
 181 
     | 
    
         
            +
                      require 'ruby-debug'
         
     | 
| 
      
 182 
     | 
    
         
            +
                    rescue LoadError
         
     | 
| 
      
 183 
     | 
    
         
            +
                      raise <<-EOM
         
     | 
| 
      
 184 
     | 
    
         
            +
             
     | 
| 
      
 185 
     | 
    
         
            +
            #{'*'*50}
         
     | 
| 
      
 186 
     | 
    
         
            +
            You must install ruby-debug to run rspec with the --debug option.
         
     | 
| 
      
 187 
     | 
    
         
            +
             
     | 
| 
      
 188 
     | 
    
         
            +
            If you have ruby-debug installed as a ruby gem, then you need to either
         
     | 
| 
      
 189 
     | 
    
         
            +
            require 'rubygems' or configure the RUBYOPT environment variable with
         
     | 
| 
      
 190 
     | 
    
         
            +
            the value 'rubygems'.
         
     | 
| 
      
 191 
     | 
    
         
            +
            #{'*'*50}
         
     | 
| 
      
 192 
     | 
    
         
            +
            EOM
         
     | 
| 
      
 193 
     | 
    
         
            +
                    end
         
     | 
| 
       184 
194 
     | 
    
         
             
                  end
         
     | 
| 
       185 
195 
     | 
    
         | 
| 
       186 
196 
     | 
    
         
             
                  def line_number=(line_number)
         
     | 
| 
         @@ -1,25 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Kernel
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
              def method_missing(m, *a)
         
     | 
| 
       6 
     | 
    
         
            -
                if m.to_s == 'debugger'
         
     | 
| 
       7 
     | 
    
         
            -
                  begin
         
     | 
| 
       8 
     | 
    
         
            -
                    require 'ruby-debug'
         
     | 
| 
       9 
     | 
    
         
            -
                    debugger
         
     | 
| 
       10 
     | 
    
         
            -
                  rescue LoadError => e
         
     | 
| 
       11 
     | 
    
         
            -
                    warn <<-EOM
         
     | 
| 
       12 
     | 
    
         
            -
            #{'*'*50}
         
     | 
| 
       13 
     | 
    
         
            -
            The debugger statement on the following line was ignored:
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
              #{caller(0).detect {|l| l !~ /method_missing/}}
         
     | 
| 
       16 
     | 
    
         
            -
             
         
     | 
| 
       17 
     | 
    
         
            -
            To use the debugger statement, you must install ruby-debug.
         
     | 
| 
       18 
     | 
    
         
            -
            #{'*'*50}
         
     | 
| 
       19 
     | 
    
         
            -
            EOM
         
     | 
| 
       20 
     | 
    
         
            -
                  end
         
     | 
| 
       21 
     | 
    
         
            -
                else
         
     | 
| 
       22 
     | 
    
         
            -
                  super
         
     | 
| 
       23 
     | 
    
         
            -
                end
         
     | 
| 
       24 
     | 
    
         
            -
              end
         
     | 
| 
      
 2 
     | 
    
         
            +
              def debugger(*args)
         
     | 
| 
      
 3 
     | 
    
         
            +
                RSpec.configuration.error_stream.puts "debugger statement ignored, use -d or --debug option to enable debugging\n#{caller(0)[1]}"
         
     | 
| 
      
 4 
     | 
    
         
            +
              end unless respond_to?(:debugger)
         
     | 
| 
       25 
5 
     | 
    
         
             
            end
         
     | 
    
        data/lib/rspec/core/version.rb
    CHANGED
    
    
    
        data/spec/autotest/rspec_spec.rb
    CHANGED
    
    | 
         @@ -39,6 +39,12 @@ describe Autotest::Rspec2 do 
     | 
|
| 
       39 
39 
     | 
    
         
             
                    cmd.should match(/'#{File.expand_path(file_to_test)}'/)
         
     | 
| 
       40 
40 
     | 
    
         
             
                  end
         
     | 
| 
       41 
41 
     | 
    
         
             
                end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                it "gives '--tty' to #{Autotest::Rspec2::SPEC_PROGRAM}, not '--autotest'" do
         
     | 
| 
      
 44 
     | 
    
         
            +
                  cmd = rspec_autotest.make_test_cmd(@files_to_test)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  cmd.should match(' --tty ')
         
     | 
| 
      
 46 
     | 
    
         
            +
                  cmd.should_not match(' --autotest ')
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
       42 
48 
     | 
    
         
             
              end
         
     | 
| 
       43 
49 
     | 
    
         | 
| 
       44 
50 
     | 
    
         
             
              describe "mappings" do
         
     | 
| 
         @@ -503,13 +503,20 @@ module RSpec::Core 
     | 
|
| 
       503 
503 
     | 
    
         
             
                  end
         
     | 
| 
       504 
504 
     | 
    
         
             
                end
         
     | 
| 
       505 
505 
     | 
    
         | 
| 
       506 
     | 
    
         
            -
                describe "#debug=" do
         
     | 
| 
       507 
     | 
    
         
            -
                  it " 
     | 
| 
       508 
     | 
    
         
            -
                     
     | 
| 
      
 506 
     | 
    
         
            +
                describe "#debug=true" do
         
     | 
| 
      
 507 
     | 
    
         
            +
                  it "requires 'ruby-debug'" do
         
     | 
| 
      
 508 
     | 
    
         
            +
                    config.should_receive(:require).with('ruby-debug')
         
     | 
| 
       509 
509 
     | 
    
         
             
                    config.debug = true
         
     | 
| 
       510 
510 
     | 
    
         
             
                  end
         
     | 
| 
       511 
511 
     | 
    
         
             
                end
         
     | 
| 
       512 
512 
     | 
    
         | 
| 
      
 513 
     | 
    
         
            +
                describe "#debug=false" do
         
     | 
| 
      
 514 
     | 
    
         
            +
                  it "does not require 'ruby-debug'" do
         
     | 
| 
      
 515 
     | 
    
         
            +
                    config.should_not_receive(:require).with('ruby-debug')
         
     | 
| 
      
 516 
     | 
    
         
            +
                    config.debug = false
         
     | 
| 
      
 517 
     | 
    
         
            +
                  end
         
     | 
| 
      
 518 
     | 
    
         
            +
                end
         
     | 
| 
      
 519 
     | 
    
         
            +
             
     | 
| 
       513 
520 
     | 
    
         
             
                describe "#output=" do
         
     | 
| 
       514 
521 
     | 
    
         
             
                  it "sets the output" do
         
     | 
| 
       515 
522 
     | 
    
         
             
                    output = mock("output")
         
     | 
| 
         @@ -1,12 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'spec_helper'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            describe "extensions" do
         
     | 
| 
       4 
     | 
    
         
            -
              describe " 
     | 
| 
       5 
     | 
    
         
            -
                it " 
     | 
| 
       6 
     | 
    
         
            -
                   
     | 
| 
       7 
     | 
    
         
            -
                  object.should_receive(:warn).with(/debugger .* ignored:\n.* ruby-debug/m)
         
     | 
| 
       8 
     | 
    
         
            -
                  object.stub(:require) { raise LoadError }
         
     | 
| 
       9 
     | 
    
         
            -
                  object.__send__ :method_missing, :debugger
         
     | 
| 
      
 4 
     | 
    
         
            +
              describe "debugger" do
         
     | 
| 
      
 5 
     | 
    
         
            +
                it "is defined on Kernel" do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  Kernel.should respond_to(:debugger)
         
     | 
| 
       10 
7 
     | 
    
         
             
                end
         
     | 
| 
       11 
8 
     | 
    
         
             
              end
         
     | 
| 
       12 
9 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version 
     | 
|
| 
       5 
5 
     | 
    
         
             
              segments: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              - 2
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
     | 
    
         
            -
              -  
     | 
| 
       9 
     | 
    
         
            -
              version: 2.2. 
     | 
| 
      
 8 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 2.2.1
         
     | 
| 
       10 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       11 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            - Chad Humphries
         
     | 
| 
         @@ -185,7 +185,7 @@ licenses: [] 
     | 
|
| 
       185 
185 
     | 
    
         
             
            post_install_message: |
         
     | 
| 
       186 
186 
     | 
    
         
             
              **************************************************
         
     | 
| 
       187 
187 
     | 
    
         | 
| 
       188 
     | 
    
         
            -
                Thank you for installing rspec-core-2.2. 
     | 
| 
      
 188 
     | 
    
         
            +
                Thank you for installing rspec-core-2.2.1
         
     | 
| 
       189 
189 
     | 
    
         | 
| 
       190 
190 
     | 
    
         
             
                Please be sure to look at the upgrade instructions to see what might have
         
     | 
| 
       191 
191 
     | 
    
         
             
                changed since the last release:
         
     | 
| 
         @@ -203,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       203 
203 
     | 
    
         
             
              requirements: 
         
     | 
| 
       204 
204 
     | 
    
         
             
              - - ">="
         
     | 
| 
       205 
205 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       206 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 206 
     | 
    
         
            +
                  hash: 1903527801491701524
         
     | 
| 
       207 
207 
     | 
    
         
             
                  segments: 
         
     | 
| 
       208 
208 
     | 
    
         
             
                  - 0
         
     | 
| 
       209 
209 
     | 
    
         
             
                  version: "0"
         
     | 
| 
         @@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       212 
212 
     | 
    
         
             
              requirements: 
         
     | 
| 
       213 
213 
     | 
    
         
             
              - - ">="
         
     | 
| 
       214 
214 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       215 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 215 
     | 
    
         
            +
                  hash: 1903527801491701524
         
     | 
| 
       216 
216 
     | 
    
         
             
                  segments: 
         
     | 
| 
       217 
217 
     | 
    
         
             
                  - 0
         
     | 
| 
       218 
218 
     | 
    
         
             
                  version: "0"
         
     | 
| 
         @@ -222,7 +222,7 @@ rubyforge_project: rspec 
     | 
|
| 
       222 
222 
     | 
    
         
             
            rubygems_version: 1.3.7
         
     | 
| 
       223 
223 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       224 
224 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       225 
     | 
    
         
            -
            summary: rspec-core-2.2. 
     | 
| 
      
 225 
     | 
    
         
            +
            summary: rspec-core-2.2.1
         
     | 
| 
       226 
226 
     | 
    
         
             
            test_files: 
         
     | 
| 
       227 
227 
     | 
    
         
             
            - features/README.markdown
         
     | 
| 
       228 
228 
     | 
    
         
             
            - features/command_line/configure.feature
         
     |