rspec 1.1.9 → 1.1.10

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.
@@ -1,3 +1,14 @@
1
+ === Version 1.1.10 / 2008-10-24
2
+
3
+ * 1 minor enhancement
4
+
5
+ * hash.should include(:key => 'value') #when you don't care about the whole hash
6
+
7
+ * 2 bug fixes
8
+
9
+ * fix --help output (had inaccurate info about 'nested' formatter)
10
+ * eliminate spicycode-rcov dev dependency for rubygems < 1.3
11
+
1
12
  === Version 1.1.9 / 2008-10-20
2
13
 
3
14
  WARNING: This release removes implicit inclusion of modules in example groups.
@@ -6,15 +17,15 @@ included in the group.
6
17
 
7
18
  * 2 major enhancements
8
19
 
9
- * Add extend to configuration (thanks to advice from Chad Fowler)
10
- * Modules are no longer implicitly included in example groups
20
+ * Add extend to configuration (thanks to advice from Chad Fowler)
21
+ * Modules are no longer implicitly included in example groups
11
22
 
12
23
  * 4 minor enhancements
13
24
 
14
25
  * mingw indicates windows too (thanks to Luis Lavena for the tip)
15
- * improved output for partial mock expecation failures
16
- * it_should_behave_like now accepts n names of shared groups
17
- * eliminated redundant inclusion/extension of ExampleGroupMethods
26
+ * improved output for partial mock expecation failures
27
+ * it_should_behave_like now accepts n names of shared groups
28
+ * eliminated redundant inclusion/extension of ExampleGroupMethods
18
29
 
19
30
  * 6 bug fixes
20
31
 
@@ -22,8 +33,8 @@ included in the group.
22
33
  * fixed typo in help. Fixes #73.
23
34
  * fixed bug where should_receive..and_yield after similar stub added the args_to_yield to the stub's original args_to_yield (Pat Maddox)
24
35
  * fixed bug where rspec-autotest (autospec) was loading non-spec files in spec directory. Fixes #559.
25
- * fixed bug where should_not_receive was reporting twice
26
- * fixed bug where rspec tries to run examples just because it is required (even if there are no examples loaded). Fixes #575.
36
+ * fixed bug where should_not_receive was reporting twice
37
+ * fixed bug where rspec tries to run examples just because it is required (even if there are no examples loaded). Fixes #575.
27
38
 
28
39
  === Version 1.1.8 / 2008-10-03
29
40
 
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Hoe.new('rspec', Spec::VERSION::STRING) do |p|
18
18
  p.url = 'http://rspec.info/'
19
19
  p.description = "Behaviour Driven Development for Ruby."
20
20
  p.rubyforge_name = 'rspec'
21
- p.extra_dev_deps = ['diff-lcs',['spicycode-rcov','>= 0.8.1.3'],'syntax']
21
+ p.extra_dev_deps = ['diff-lcs','syntax']
22
22
  p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
23
23
  p.remote_rdoc_dir = "rspec/#{Spec::VERSION::STRING}"
24
24
  end
@@ -10,7 +10,14 @@ module Spec
10
10
  def matches?(given)
11
11
  @given = given
12
12
  @expecteds.each do |expected|
13
- return false unless given.include?(expected)
13
+ case given
14
+ when Hash
15
+ expected.each_pair do |k,v|
16
+ return false unless given[k] == v
17
+ end
18
+ else
19
+ return false unless given.include?(expected)
20
+ end
14
21
  end
15
22
  true
16
23
  end
@@ -42,19 +42,19 @@ module Spec
42
42
  "not specified. The --format option may be specified several times",
43
43
  "if you want several outputs",
44
44
  " ",
45
- "Builtin formats for examples: ",
46
- "progress|p : Text progress",
47
- "profile|o : Text progress with profiling of 10 slowest examples",
48
- "specdoc|s : Example doc as text",
49
- "indented|i : Example doc as indented text",
45
+ "Builtin formats for code examples:",
46
+ "progress|p : Text-based progress bar",
47
+ "profile|o : Text-based progress bar with profiling of 10 slowest examples",
48
+ "specdoc|s : Code example doc strings",
49
+ "nested|n : Code example doc strings with nested groups intented",
50
50
  "html|h : A nice HTML report",
51
51
  "failing_examples|e : Write all failing examples - input for --example",
52
52
  "failing_example_groups|g : Write all failing example groups - input for --example",
53
53
  " ",
54
- "Builtin formats for stories: ",
55
- "plain|p : Plain Text",
56
- "html|h : A nice HTML report",
57
- "progress|r : Text progress",
54
+ "Builtin formats for stories:",
55
+ "plain|p : Plain Text",
56
+ "html|h : A nice HTML report",
57
+ "progress|r : Text progress",
58
58
  " ",
59
59
  "FORMAT can also be the name of a custom formatter class",
60
60
  "(in which case you should also specify --require to load it)"],
@@ -8,7 +8,7 @@ module Spec
8
8
  EXAMPLE_FORMATTERS = { # Load these lazily for better speed
9
9
  'specdoc' => ['spec/runner/formatter/specdoc_formatter', 'Formatter::SpecdocFormatter'],
10
10
  's' => ['spec/runner/formatter/specdoc_formatter', 'Formatter::SpecdocFormatter'],
11
- 'nested' => ['spec/runner/formatter/nested_text_formatter', 'Formatter::NestedTextFormatter'],
11
+ 'nested' => ['spec/runner/formatter/nested_text_formatter', 'Formatter::NestedTextFormatter'],
12
12
  'n' => ['spec/runner/formatter/nested_text_formatter', 'Formatter::NestedTextFormatter'],
13
13
  'html' => ['spec/runner/formatter/html_formatter', 'Formatter::HtmlFormatter'],
14
14
  'h' => ['spec/runner/formatter/html_formatter', 'Formatter::HtmlFormatter'],
@@ -3,7 +3,7 @@ module Spec
3
3
  unless defined? MAJOR
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- TINY = 9
6
+ TINY = 10
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
 
@@ -1,12 +1,13 @@
1
+ (in /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec)
1
2
  # -*- encoding: utf-8 -*-
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = %q{rspec}
5
- s.version = "1.1.9"
6
+ s.version = "1.1.10"
6
7
 
7
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
9
  s.authors = ["RSpec Development Team"]
9
- s.date = %q{2008-10-20}
10
+ s.date = %q{2008-10-24}
10
11
  s.description = %q{Behaviour Driven Development for Ruby.}
11
12
  s.email = ["rspec-devel@rubyforge.org"]
12
13
  s.executables = ["autospec", "spec"]
@@ -18,7 +19,7 @@ Gem::Specification.new do |s|
18
19
  s.require_paths = ["lib"]
19
20
  s.rubyforge_project = %q{rspec}
20
21
  s.rubygems_version = %q{1.3.0}
21
- s.summary = %q{rspec 1.1.9}
22
+ s.summary = %q{rspec 1.1.10}
22
23
 
23
24
  if s.respond_to? :specification_version then
24
25
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -26,19 +27,17 @@ Gem::Specification.new do |s|
26
27
 
27
28
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
29
  s.add_development_dependency(%q<diff-lcs>, [">= 0"])
29
- s.add_development_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
30
30
  s.add_development_dependency(%q<syntax>, [">= 0"])
31
- s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
31
+ s.add_development_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
32
+ s.add_development_dependency(%q<hoe>, [">= 1.8.1"])
32
33
  else
33
34
  s.add_dependency(%q<diff-lcs>, [">= 0"])
34
- s.add_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
35
35
  s.add_dependency(%q<syntax>, [">= 0"])
36
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
36
+ s.add_dependency(%q<hoe>, [">= 1.8.1"])
37
37
  end
38
38
  else
39
39
  s.add_dependency(%q<diff-lcs>, [">= 0"])
40
- s.add_dependency(%q<spicycode-rcov>, [">= 0.8.1.3"])
41
40
  s.add_dependency(%q<syntax>, [">= 0"])
42
- s.add_dependency(%q<hoe>, [">= 1.8.0"])
41
+ s.add_dependency(%q<hoe>, [">= 1.8.1"])
43
42
  end
44
43
  end
@@ -43,3 +43,22 @@ describe "should_not include(expected)" do
43
43
  }.should fail_with("expected \"abc\" not to include \"c\"")
44
44
  end
45
45
  end
46
+
47
+ describe "should include(:key => value)" do
48
+ it "should pass if target is a Hash and includes the key/value pair" do
49
+ {:key => 'value'}.should include(:key => 'value')
50
+ end
51
+ it "should pass if target is a Hash and includes the key/value pair among others" do
52
+ {:key => 'value', :other => 'different'}.should include(:key => 'value')
53
+ end
54
+ it "should fail if target is a Hash and has a different value for key" do
55
+ lambda {
56
+ {:key => 'different'}.should include(:key => 'value')
57
+ }.should fail_with(%Q|expected {:key=>"different"} to include {:key=>"value"}|)
58
+ end
59
+ it "should fail if target is a Hash and has a different key" do
60
+ lambda {
61
+ {:other => 'value'}.should include(:key => 'value')
62
+ }.should fail_with(%Q|expected {:other=>"value"} to include {:key=>"value"}|)
63
+ end
64
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - RSpec Development Team
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-20 00:00:00 -05:00
12
+ date: 2008-10-24 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,16 +22,6 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
- - !ruby/object:Gem::Dependency
26
- name: spicycode-rcov
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 0.8.1.3
34
- version:
35
25
  - !ruby/object:Gem::Dependency
36
26
  name: syntax
37
27
  type: :development
@@ -50,7 +40,7 @@ dependencies:
50
40
  requirements:
51
41
  - - ">="
52
42
  - !ruby/object:Gem::Version
53
- version: 1.8.0
43
+ version: 1.8.1
54
44
  version:
55
45
  description: Behaviour Driven Development for Ruby.
56
46
  email:
@@ -503,6 +493,6 @@ rubyforge_project: rspec
503
493
  rubygems_version: 1.3.0
504
494
  signing_key:
505
495
  specification_version: 2
506
- summary: rspec 1.1.9
496
+ summary: rspec 1.1.10
507
497
  test_files: []
508
498