rspec-core 2.0.0.a5 → 2.0.0.a6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/example_specs/failing/diffing_spec.rb +3 -1
  2. data/example_specs/spec_helper.rb +1 -1
  3. data/features/configuration/spec_opts.feature +7 -7
  4. data/features/example_groups/describe_aliases.feature +1 -1
  5. data/features/example_groups/nested_groups.feature +3 -6
  6. data/features/{before_and_after_blocks/around.feature → hooks/around_hook.feature} +1 -1
  7. data/features/{before_and_after_blocks/before_and_after_blocks.feature → hooks/before_and_after_hooks.feature} +3 -3
  8. data/features/hooks/halt.feature +27 -0
  9. data/features/mock_framework_integration/use_flexmock.feature +1 -1
  10. data/features/mock_framework_integration/use_mocha.feature +1 -1
  11. data/features/mock_framework_integration/use_rr.feature +1 -1
  12. data/features/mock_framework_integration/use_rspec.feature +1 -1
  13. data/features/mocks/block_local_expectations.feature +2 -2
  14. data/features/mocks/mix_stubs_and_mocks.feature +1 -1
  15. data/lib/rspec/core.rb +6 -0
  16. data/lib/rspec/core/around_proxy.rb +14 -0
  17. data/lib/rspec/core/deprecation.rb +25 -26
  18. data/lib/rspec/core/example.rb +11 -21
  19. data/lib/rspec/core/example_group.rb +27 -22
  20. data/lib/rspec/core/runner.rb +12 -12
  21. data/lib/rspec/core/version.rb +1 -1
  22. data/rspec-core.gemspec +13 -11
  23. data/spec/rspec/core/configuration_spec.rb +2 -4
  24. data/spec/rspec/core/example_group_spec.rb +263 -292
  25. data/spec/rspec/core/example_group_subject_spec.rb +26 -31
  26. data/spec/rspec/core/mocha_spec.rb +8 -10
  27. data/spec/rspec/core/pending_example_spec.rb +1 -1
  28. data/spec/rspec/core/runner_spec.rb +2 -2
  29. data/spec/rspec/core/shared_example_group_spec.rb +120 -129
  30. data/spec/rspec/core/world_spec.rb +111 -116
  31. data/spec/rspec/core_spec.rb +2 -2
  32. data/spec/spec_helper.rb +2 -23
  33. metadata +9 -7
@@ -13,13 +13,13 @@ describe Rspec::Core do
13
13
  describe "#configure" do
14
14
 
15
15
  it "should yield the current configuration" do
16
- Rspec::Core.configure do |config|
16
+ Rspec.configure do |config|
17
17
  config.should == Rspec::Core.configuration
18
18
  end
19
19
  end
20
20
 
21
21
  it "should be callable without a block" do
22
- lambda { Rspec::Core.configure }.should_not raise_error
22
+ lambda { Rspec.configure }.should_not raise_error
23
23
  end
24
24
 
25
25
  end
@@ -10,7 +10,7 @@ require 'rspec/mocks'
10
10
  Rspec::Core::ExampleGroup.send(:include, Rspec::Matchers)
11
11
 
12
12
  def with_ruby(version)
13
- yield if RUBY_PLATFORM =~ Regexp.compile("^#{version}")
13
+ yield if RUBY_VERSION.to_s =~ Regexp.compile("^#{version}")
14
14
  end
15
15
 
16
16
  module Rspec
@@ -27,27 +27,6 @@ module Rspec
27
27
  end
28
28
  end
29
29
 
30
- def remove_last_example_group_from_world
31
- Rspec::Core.world.example_groups.pop
32
- end
33
-
34
- def disconnect_from_world
35
- example_groups = Rspec::Core.world.example_groups.dup
36
- Rspec::Core.world.example_groups.clear
37
- yield
38
- ensure
39
- Rspec::Core.world.example_groups.clear
40
- Rspec::Core.world.example_groups.concat(example_groups)
41
- end
42
-
43
- def isolated_example_group(*args, &block)
44
- block ||= lambda {}
45
- args << 'example group' if args.empty?
46
- group = Rspec::Core::ExampleGroup.describe(*args, &block)
47
- remove_last_example_group_from_world
48
- group
49
- end
50
-
51
30
  def use_formatter(new_formatter)
52
31
  original_formatter = Rspec::Core.configuration.formatter
53
32
  Rspec::Core.configuration.instance_variable_set(:@formatter, new_formatter)
@@ -60,7 +39,7 @@ def in_editor?
60
39
  ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM')
61
40
  end
62
41
 
63
- Rspec::Core.configure do |c|
42
+ Rspec.configure do |c|
64
43
  c.mock_framework = :rspec
65
44
  c.filter_run :focused => true
66
45
  c.run_all_when_everything_filtered = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.a5
4
+ version: 2.0.0.a6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Humphries
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-07 00:00:00 -04:00
13
+ date: 2010-02-15 00:00:00 -04:00
14
14
  default_executable: rspec
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 2.0.0.a5
24
+ version: 2.0.0.a6
25
25
  version:
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec-mocks
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 2.0.0.a5
34
+ version: 2.0.0.a6
35
35
  version:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cucumber
@@ -125,8 +125,6 @@ files:
125
125
  - features-pending/mocks/stub_implementation.feature
126
126
  - features-pending/pending/pending_examples.feature
127
127
  - features-pending/runner/specify_line_number.feature
128
- - features/before_and_after_blocks/around.feature
129
- - features/before_and_after_blocks/before_and_after_blocks.feature
130
128
  - features/command_line/example_name_option.feature
131
129
  - features/command_line/line_number_appended_to_path.feature
132
130
  - features/command_line/line_number_option.feature
@@ -134,6 +132,9 @@ files:
134
132
  - features/example_groups/describe_aliases.feature
135
133
  - features/example_groups/nested_groups.feature
136
134
  - features/expectations/customized_message.feature
135
+ - features/hooks/around_hook.feature
136
+ - features/hooks/before_and_after_hooks.feature
137
+ - features/hooks/halt.feature
137
138
  - features/matchers/define_matcher.feature
138
139
  - features/matchers/define_matcher_outside_rspec.feature
139
140
  - features/mock_framework_integration/use_flexmock.feature
@@ -150,6 +151,7 @@ files:
150
151
  - lib/rspec/autorun.rb
151
152
  - lib/rspec/core.rb
152
153
  - lib/rspec/core/advice.rb
154
+ - lib/rspec/core/around_proxy.rb
153
155
  - lib/rspec/core/backward_compatibility.rb
154
156
  - lib/rspec/core/command_line_options.rb
155
157
  - lib/rspec/core/configuration.rb
@@ -231,7 +233,7 @@ rubyforge_project: rspec
231
233
  rubygems_version: 1.3.5
232
234
  signing_key:
233
235
  specification_version: 3
234
- summary: rspec-core 2.0.0.a5
236
+ summary: rspec-core 2.0.0.a6
235
237
  test_files:
236
238
  - spec/rspec/core/command_line_options_spec.rb
237
239
  - spec/rspec/core/configuration_spec.rb