rspec 0.5.14 → 0.5.15

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,10 @@
1
1
  = RSpec Changelog
2
2
 
3
+ == Version 0.5.15
4
+ This release removes a prematurely added feature that shouldn't have been added.
5
+
6
+ * Removed support for differences that was added in 0.5.14. The functionality is not aligned with RSpec's vision.
7
+
3
8
  == Version 0.5.14
4
9
  This release introduces better ways to extend specs, improves some of the core API and
5
10
  a experimental support for faster rails specs.
data/EXAMPLES.rd CHANGED
@@ -5,6 +5,10 @@
5
5
  # BDD framework
6
6
  # * should be adopted quickly
7
7
  # * should be intuitive
8
+ # Rspec allow you to define custom methods
9
+ # * Rspec should allow you to define methods
10
+ # Rspec allow you to define custom methods
11
+ # * Rspec should allow you to define methods
8
12
  # A FileAccessor
9
13
  # * should open a file and pass it to the processor's process method
10
14
  # An IoProcessor
@@ -37,3 +41,7 @@
37
41
  # Underscore sugar
38
42
  # * should be available for regular objects
39
43
  # * should be available for mocks
44
+ # Rspec should integrate with Test::Unit::TestCase
45
+ # * TestCase#setup should be called.
46
+ # * Rspec should be able to access TestCase methods
47
+ # * Rspec should be able to accept included modules
@@ -3,8 +3,8 @@ class FalseClass; def inspect_for_expectation_not_met_error; "<false>" end end
3
3
  class NilClass; def inspect_for_expectation_not_met_error; "nil" end end
4
4
  class Class; def inspect_for_expectation_not_met_error; "<#{name}>" end end
5
5
  class Proc; def inspect_for_expectation_not_met_error; "<Proc>" end end
6
- class Array; def inspect_for_expectation_not_met_error; "#{inspect}" end end
7
- class String; def inspect_for_expectation_not_met_error; "#{inspect}" end end
6
+ class Array; def inspect_for_expectation_not_met_error; inspect end end
7
+ class String; def inspect_for_expectation_not_met_error; inspect end end
8
8
  class Object
9
9
  def inspect_for_expectation_not_met_error
10
10
  return "#{self.class} #{inspect}" if inspect.include? "<"
@@ -13,7 +13,6 @@ class Object
13
13
  end
14
14
 
15
15
  module Spec
16
-
17
16
  class ShouldBase
18
17
 
19
18
  def default_message(expectation, expected=:no_expectation_specified)
@@ -29,5 +28,4 @@ module Spec
29
28
  end
30
29
 
31
30
  end
32
-
33
31
  end
@@ -84,16 +84,5 @@ module Spec
84
84
  end
85
85
  end
86
86
 
87
- def increment(object, method, difference=1)
88
- initial_value = object.__send__(method)
89
- @target.call
90
- object.__send__(method).should.equal(initial_value + difference)
91
- end
92
-
93
- def decrement(object, method, difference=1)
94
- increment(object, method, -difference)
95
- end
96
-
97
87
  end
98
-
99
88
  end
@@ -68,16 +68,6 @@ module Spec
68
68
  true
69
69
  end
70
70
  end
71
-
72
- def increment(object, method, difference=1)
73
- initial_value = object.__send__(method)
74
- @target.call
75
- object.__send__(method).should.not.equal(initial_value + difference)
76
- end
77
-
78
- def decrement(object, method, difference=1)
79
- increment(object, method, -difference)
80
- end
81
71
 
82
72
  def method_missing(sym, *args)
83
73
  return unless @target.send("#{sym}?", *args)
data/lib/spec/version.rb CHANGED
@@ -3,7 +3,7 @@ module Spec
3
3
  unless defined? MAJOR
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- TINY = 14
6
+ TINY = 15
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  TAG = "REL_" + [MAJOR, MINOR, TINY].join('_')
metadata CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rspec
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.14
6
+ version: 0.5.15
7
7
  date: 2006-07-14 00:00:00 -05:00
8
- summary: RSpec-0.5.14 - BDD for Ruby http://rspec.rubyforge.org/
8
+ summary: RSpec-0.5.15 - BDD for Ruby http://rspec.rubyforge.org/
9
9
  require_paths:
10
10
  - lib
11
11
  email: rspec-devel@rubyforge.org
@@ -85,7 +85,6 @@ files:
85
85
  - test/spec/api/helper/arbitrary_predicate_test.rb
86
86
  - test/spec/api/helper/containment_test.rb
87
87
  - test/spec/api/helper/diff_test.rb
88
- - test/spec/api/helper/difference_test.rb
89
88
  - test/spec/api/helper/identity_test.rb
90
89
  - test/spec/api/helper/object_equality_test.rb
91
90
  - test/spec/api/helper/raising_test.rb
@@ -1,78 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../test_helper'
2
-
3
- module Spec
4
- module Api
5
- module Helper
6
- class ShouldIncrementTest < Test::Unit::TestCase
7
- def test_should_pass_when_block_increments
8
- assert_nothing_raised do
9
- arr = []
10
- lambda { arr << "something" }.should.increment arr, :length
11
- end
12
- end
13
-
14
- def test_should_pass_when_block_increments_unsing_underscores
15
- assert_nothing_raised do
16
- arr = []
17
- lambda { arr << "something" }.should_increment arr, :length
18
- end
19
- end
20
-
21
- def test_should_fail_when_block_doesnt_increment
22
- assert_raise(ExpectationNotMetError) do
23
- arr = []
24
- lambda {}.should.increment arr, :length
25
- end
26
- end
27
- end
28
-
29
- class ShouldNotIncrementTest < Test::Unit::TestCase
30
- def test_should_pass_when_block_doesnt_increment
31
- assert_nothing_raised do
32
- arr = []
33
- lambda {}.should.not.increment arr, :length
34
- end
35
- end
36
-
37
- def test_should_fail_when_block_increments
38
- assert_raise(ExpectationNotMetError) do
39
- arr = []
40
- lambda {arr << "something" }.should.not.increment arr, :length
41
- end
42
- end
43
- end
44
-
45
- class ShouldDecrementTest < Test::Unit::TestCase
46
- def test_should_pass_when_block_decrements
47
- assert_nothing_raised do
48
- arr = ["something"]
49
- lambda { arr.pop }.should.decrement arr, :length
50
- end
51
- end
52
-
53
- def test_should_fail_when_block_doesnt_decrement
54
- assert_raise(ExpectationNotMetError) do
55
- arr = ["something"]
56
- lambda {}.should.decrement arr, :length
57
- end
58
- end
59
- end
60
-
61
- class ShouldNotDecrementTest < Test::Unit::TestCase
62
- def test_should_pass_when_block_doesnt_decrement
63
- assert_nothing_raised do
64
- arr = ["something"]
65
- lambda {}.should.not.decrement arr, :length
66
- end
67
- end
68
-
69
- def test_should_fail_when_block_decrements
70
- assert_raise(ExpectationNotMetError) do
71
- arr = ["something"]
72
- lambda { arr.pop }.should.not.decrement arr, :length
73
- end
74
- end
75
- end
76
- end
77
- end
78
- end