rspec-expectations 2.0.0.beta.16 → 2.0.0.beta.17

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
+ source "http://rubygems.org"
2
+
1
3
  gem "rake"
2
4
  gem "jeweler"
3
5
  gem "cucumber"
4
- gem "aruba"
6
+ gem "aruba", ">= 0.2.0"
5
7
  gem "autotest"
6
8
  gem "diff-lcs"
7
9
  gem "rspec-expectations", :path => "."
@@ -3,7 +3,7 @@
3
3
  rspec-expectations adds `should` and `should_not` to every object and includes
4
4
  RSpec::Matchers, a library of standard matchers.
5
5
 
6
- # Matchers
6
+ ## Matchers
7
7
 
8
8
  Matchers are objects used to compose expectations:
9
9
 
@@ -12,9 +12,12 @@ Matchers are objects used to compose expectations:
12
12
  In that example, `eq("this value")` returns a `Matcher` object that
13
13
  compares the actual `result` to the expected `"this value"`.
14
14
 
15
- #### Also see
15
+ ## Contribute
16
+
17
+ See [http://github.com/rspec/rspec-dev](http://github.com/rspec/rspec-dev)
18
+
19
+ ## Also see
16
20
 
17
21
  * [http://github.com/rspec/rspec](http://github.com/rspec/rspec)
18
22
  * [http://github.com/rspec/rspec-core](http://github.com/rspec/rspec-core)
19
23
  * [http://github.com/rspec/rspec-mocks](http://github.com/rspec/rspec-mocks)
20
- * [http://github.com/rspec/rspec-dev](http://github.com/rspec/rspec-dev)
data/Rakefile CHANGED
@@ -3,7 +3,10 @@ Bundler.setup
3
3
 
4
4
  $LOAD_PATH << File.expand_path("../lib", __FILE__)
5
5
  require 'rake'
6
+ require 'rake/rdoctask'
6
7
  require 'rspec/expectations/version'
8
+ require 'rspec/core/rake_task'
9
+ require 'cucumber/rake/task'
7
10
 
8
11
  begin
9
12
  require 'jeweler'
@@ -40,25 +43,22 @@ namespace :gem do
40
43
  end
41
44
  end
42
45
 
43
- begin
44
- require 'rspec/core/rake_task'
45
- RSpec::Core::RakeTask.new(:spec)
46
- rescue LoadError
47
- puts "RSpec core or one of its dependencies is not installed. Install it with: gem install rspec-core"
48
- end
46
+ RSpec::Core::RakeTask.new(:spec)
49
47
 
50
- begin
51
- require 'cucumber/rake/task'
52
- Cucumber::Rake::Task.new do |t|
53
- t.cucumber_opts = %w{--format progress}
48
+ class Cucumber::Rake::Task::ForkedCucumberRunner
49
+ # When cucumber shells out, we still need it to run in the context of our
50
+ # bundle.
51
+ def run
52
+ sh "bundle exec #{RUBY} " + args.join(" ")
54
53
  end
55
- rescue LoadError
56
- puts "Cucumber or one of its dependencies is not installed. Install it with: gem install cucumber"
54
+ end
55
+
56
+ Cucumber::Rake::Task.new do |t|
57
+ t.cucumber_opts = %w{--format progress}
57
58
  end
58
59
 
59
60
  task :default => [:check_dependencies, :spec, :cucumber]
60
61
 
61
- require 'rake/rdoctask'
62
62
  Rake::RDocTask.new do |rdoc|
63
63
  if File.exist?('VERSION.yml')
64
64
  config = YAML.load(File.read('VERSION.yml'))
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta.16
1
+ 2.0.0.beta.17
@@ -15,5 +15,5 @@ Feature: attribute of subject
15
15
  """
16
16
 
17
17
  When I run "rspec example_spec.rb -fdoc"
18
- Then I should see "Failure/Error: its(:size) { should eq(1) }"
19
- And I should see "expected 1"
18
+ Then the output should contain "Failure/Error: its(:size) { should eq(1) }"
19
+ And the output should contain "expected 1"
@@ -46,9 +46,9 @@ Feature: customized message
46
46
 
47
47
  """
48
48
  When I run "rspec ./node_spec.rb --format documentation"
49
- Then I should see "3 examples, 3 failures"
50
- And I should not see "to return true, got false"
51
- And I should not see "to return false, got true"
52
- And I should see "node.state: started (first example)"
53
- And I should see "node.state: started (second example)"
54
- And I should see "expected a change"
49
+ Then the output should contain "3 examples, 3 failures"
50
+ And the output should not contain "to return true, got false"
51
+ And the output should not contain "to return false, got true"
52
+ And the output should contain "node.state: started (first example)"
53
+ And the output should contain "node.state: started (second example)"
54
+ And the output should contain "expected a change"
@@ -20,9 +20,9 @@ Feature: implicit docstrings
20
20
 
21
21
  When I run "rspec ./implicit_docstrings_spec.rb -fdoc"
22
22
 
23
- Then I should see "should be < 5"
24
- And I should see "should include 2"
25
- And I should see "should respond to #size"
23
+ Then the output should contain "should be < 5"
24
+ And the output should contain "should include 2"
25
+ And the output should contain "should respond to #size"
26
26
 
27
27
  Scenario Outline: run failing examples
28
28
  Given a file named "failing_implicit_docstrings_spec.rb" with:
@@ -46,7 +46,7 @@ Feature: implicit docstrings
46
46
 
47
47
  When I run "rspec ./failing_implicit_docstrings_spec.rb -fdoc"
48
48
 
49
- Then I should see "should equal 2"
50
- And I should see "should be > 5"
51
- And I should see "should include "b""
52
- And I should see "should not respond to #size"
49
+ Then the output should contain "should equal 2"
50
+ And the output should contain "should be > 5"
51
+ And the output should contain "should include "b""
52
+ And the output should contain "should not respond to #size"
@@ -29,7 +29,7 @@ Feature: access running example
29
29
  end
30
30
  """
31
31
  When I run "rspec ./example_spec.rb"
32
- Then I should see "1 example, 0 failures"
32
+ Then the output should contain "1 example, 0 failures"
33
33
 
34
34
  Scenario: call method _not_ defined on example from matcher
35
35
  Given a file named "example_spec.rb" with:
@@ -47,7 +47,7 @@ Feature: access running example
47
47
  end
48
48
  """
49
49
  When I run "rspec ./example_spec.rb"
50
- Then I should see "1 example, 1 failure"
51
- And I should see "undefined local variable"
52
- And I should see "RSpec::Matchers::Matcher"
53
- And I should not see "ExampleGroup"
50
+ Then the output should contain "1 example, 1 failure"
51
+ And the output should contain "undefined local variable"
52
+ And the output should contain "RSpec::Matchers::Matcher"
53
+ And the output should not contain "ExampleGroup"
@@ -23,5 +23,5 @@ Feature: define diffable matcher
23
23
  When I run "rspec ./diffable_matcher_spec.rb --diff"
24
24
  Then the exit status should not be 0
25
25
 
26
- And I should see "should be just like that"
27
- And I should see "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"
26
+ And the output should contain "should be just like that"
27
+ And the output should contain "Diff:\n@@ -1,2 +1,2 @@\n-that\n+this"
@@ -37,14 +37,14 @@ Feature: define matcher
37
37
  When I run "rspec ./matcher_with_default_message_spec.rb --format documentation"
38
38
  Then the exit status should not be 0
39
39
 
40
- And I should see "should be a multiple of 3"
41
- And I should see "should not be a multiple of 4"
42
- And I should see "Failure/Error: it {should be_a_multiple_of(4)}"
43
- And I should see "Failure/Error: it {should_not be_a_multiple_of(3)}"
44
-
45
- And I should see "4 examples, 2 failures"
46
- And I should see "expected 9 to be a multiple of 4"
47
- And I should see "expected 9 not to be a multiple of 3"
40
+ And the output should contain "should be a multiple of 3"
41
+ And the output should contain "should not be a multiple of 4"
42
+ And the output should contain "Failure/Error: it {should be_a_multiple_of(4)}"
43
+ And the output should contain "Failure/Error: it {should_not be_a_multiple_of(3)}"
44
+
45
+ And the output should contain "4 examples, 2 failures"
46
+ And the output should contain "expected 9 to be a multiple of 4"
47
+ And the output should contain "expected 9 not to be a multiple of 3"
48
48
 
49
49
  Scenario: overriding the failure_message_for_should
50
50
  Given a file named "matcher_with_failure_message_spec.rb" with:
@@ -34,5 +34,5 @@ Feature: define matcher outside rspec
34
34
  """
35
35
  When I run "ruby test_multiples.rb"
36
36
  Then the exit status should not be 0
37
- And I should see "expected 9 to be a multiple of 4"
38
- And I should see "2 tests, 0 assertions, 0 failures, 1 errors"
37
+ And the output should contain "expected 9 to be a multiple of 4"
38
+ And the output should contain "2 tests, 0 assertions, 0 failures, 1 errors"
@@ -23,5 +23,5 @@ Feature: define matcher
23
23
  end
24
24
  """
25
25
  When I run "rspec ./between_spec.rb --format documentation"
26
- Then I should see "1 example, 0 failures"
27
- And I should see "should be bigger than 4"
26
+ Then the output should contain "1 example, 0 failures"
27
+ And the output should contain "should be bigger than 4"
@@ -30,8 +30,8 @@ Feature: expect change
30
30
  end
31
31
  """
32
32
  When I run "rspec ./expect_change_spec.rb"
33
- Then I should see "2 examples, 1 failure"
34
- Then I should see "should have been changed by 2, but was changed by 1"
33
+ Then the output should contain "2 examples, 1 failure"
34
+ Then the output should contain "should have been changed by 2, but was changed by 1"
35
35
 
36
36
  Scenario: expecting no change
37
37
  Given a file named "expect_no_change_spec.rb" with:
@@ -61,5 +61,5 @@ Feature: expect change
61
61
  end
62
62
  """
63
63
  When I run "rspec ./expect_no_change_spec.rb"
64
- Then I should see "2 examples, 1 failure"
65
- Then I should see "should not have changed, but did change from 1 to 2"
64
+ Then the output should contain "2 examples, 1 failure"
65
+ Then the output should contain "should not have changed, but did change from 1 to 2"
@@ -19,8 +19,8 @@ Feature: expect error
19
19
  end
20
20
  """
21
21
  When I run "rspec ./expect_error_spec.rb"
22
- Then I should see "2 examples, 1 failure"
23
- Then I should see "expected NameError but nothing was raised"
22
+ Then the output should contain "2 examples, 1 failure"
23
+ Then the output should contain "expected NameError but nothing was raised"
24
24
 
25
25
  Scenario: expect no error
26
26
  Given a file named "expect_no_error_spec.rb" with:
@@ -39,6 +39,6 @@ Feature: expect error
39
39
  end
40
40
  """
41
41
  When I run "rspec ./expect_no_error_spec.rb"
42
- Then I should see "2 examples, 1 failure"
43
- Then I should see "undefined method `non_existent_message'"
42
+ Then the output should contain "2 examples, 1 failure"
43
+ Then the output should contain "undefined method `non_existent_message'"
44
44
 
@@ -1,20 +1 @@
1
- require 'bundler'
2
- Bundler.setup
3
-
4
1
  require 'aruba'
5
- require 'rspec/expectations'
6
-
7
- module ArubaOverrides
8
- def detect_ruby_script(cmd)
9
- if cmd =~ /^rspec /
10
- "bundle exec ../../../rspec-core/bin/#{cmd}"
11
- elsif cmd =~ /^ruby /
12
- "bundle exec #{cmd}"
13
- else
14
- super(cmd)
15
- end
16
- end
17
- end
18
-
19
- World(ArubaOverrides)
20
-
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rspec-expectations}
8
- s.version = "2.0.0.beta.16"
8
+ s.version = "2.0.0.beta.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Chelimsky", "Chad Humphries"]
12
- s.date = %q{2010-07-06}
12
+ s.date = %q{2010-07-11}
13
13
  s.description = %q{rspec expectations (should[_not] and matchers)}
14
14
  s.email = %q{dchelimsky@gmail.com;chad.humphries@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -113,7 +113,7 @@ Gem::Specification.new do |s|
113
113
  s.homepage = %q{http://github.com/rspec/expectations}
114
114
  s.post_install_message = %q{**************************************************
115
115
 
116
- Thank you for installing rspec-expectations-2.0.0.beta.16
116
+ Thank you for installing rspec-expectations-2.0.0.beta.17
117
117
 
118
118
  **************************************************
119
119
  }
@@ -121,7 +121,7 @@ Gem::Specification.new do |s|
121
121
  s.require_paths = ["lib"]
122
122
  s.rubyforge_project = %q{rspec}
123
123
  s.rubygems_version = %q{1.3.7}
124
- s.summary = %q{rspec-expectations-2.0.0.beta.16}
124
+ s.summary = %q{rspec-expectations-2.0.0.beta.17}
125
125
  s.test_files = [
126
126
  "spec/rspec/expectations/differ_spec.rb",
127
127
  "spec/rspec/expectations/extensions/kernel_spec.rb",
@@ -164,21 +164,21 @@ Gem::Specification.new do |s|
164
164
  s.add_runtime_dependency(%q<diff-lcs>, [">= 1.1.2"])
165
165
  s.add_development_dependency(%q<cucumber>, [">= 0.6.2"])
166
166
  s.add_development_dependency(%q<aruba>, [">= 0.1.1"])
167
- s.add_development_dependency(%q<rspec-core>, [">= 2.0.0.beta.16"])
168
- s.add_development_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.16"])
167
+ s.add_development_dependency(%q<rspec-core>, [">= 2.0.0.beta.17"])
168
+ s.add_development_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.17"])
169
169
  else
170
170
  s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
171
171
  s.add_dependency(%q<cucumber>, [">= 0.6.2"])
172
172
  s.add_dependency(%q<aruba>, [">= 0.1.1"])
173
- s.add_dependency(%q<rspec-core>, [">= 2.0.0.beta.16"])
174
- s.add_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.16"])
173
+ s.add_dependency(%q<rspec-core>, [">= 2.0.0.beta.17"])
174
+ s.add_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.17"])
175
175
  end
176
176
  else
177
177
  s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
178
178
  s.add_dependency(%q<cucumber>, [">= 0.6.2"])
179
179
  s.add_dependency(%q<aruba>, [">= 0.1.1"])
180
- s.add_dependency(%q<rspec-core>, [">= 2.0.0.beta.16"])
181
- s.add_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.16"])
180
+ s.add_dependency(%q<rspec-core>, [">= 2.0.0.beta.17"])
181
+ s.add_dependency(%q<rspec-mocks>, [">= 2.0.0.beta.17"])
182
182
  end
183
183
  end
184
184
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196419
4
+ hash: 62196417
5
5
  prerelease: true
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 0
10
10
  - beta
11
- - 16
12
- version: 2.0.0.beta.16
11
+ - 17
12
+ version: 2.0.0.beta.17
13
13
  platform: ruby
14
14
  authors:
15
15
  - David Chelimsky
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-07-06 00:00:00 -05:00
21
+ date: 2010-07-11 00:00:00 -05:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- hash: 62196419
81
+ hash: 62196417
82
82
  segments:
83
83
  - 2
84
84
  - 0
85
85
  - 0
86
86
  - beta
87
- - 16
88
- version: 2.0.0.beta.16
87
+ - 17
88
+ version: 2.0.0.beta.17
89
89
  requirement: *id004
90
90
  - !ruby/object:Gem::Dependency
91
91
  type: :development
@@ -96,14 +96,14 @@ dependencies:
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- hash: 62196419
99
+ hash: 62196417
100
100
  segments:
101
101
  - 2
102
102
  - 0
103
103
  - 0
104
104
  - beta
105
- - 16
106
- version: 2.0.0.beta.16
105
+ - 17
106
+ version: 2.0.0.beta.17
107
107
  requirement: *id005
108
108
  description: rspec expectations (should[_not] and matchers)
109
109
  email: dchelimsky@gmail.com;chad.humphries@gmail.com
@@ -214,7 +214,7 @@ licenses: []
214
214
  post_install_message: |
215
215
  **************************************************
216
216
 
217
- Thank you for installing rspec-expectations-2.0.0.beta.16
217
+ Thank you for installing rspec-expectations-2.0.0.beta.17
218
218
 
219
219
  **************************************************
220
220
 
@@ -248,7 +248,7 @@ rubyforge_project: rspec
248
248
  rubygems_version: 1.3.7
249
249
  signing_key:
250
250
  specification_version: 3
251
- summary: rspec-expectations-2.0.0.beta.16
251
+ summary: rspec-expectations-2.0.0.beta.17
252
252
  test_files:
253
253
  - spec/rspec/expectations/differ_spec.rb
254
254
  - spec/rspec/expectations/extensions/kernel_spec.rb