dchelimsky-rspec 1.1.11.1 → 1.1.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/History.txt +11 -3
  2. data/Manifest.txt +35 -46
  3. data/README.txt +30 -12
  4. data/Rakefile +9 -9
  5. data/{stories/configuration/before_blocks.story → features/configuration/before_blocks.feature} +2 -2
  6. data/{stories/example_groups/autogenerated_docstrings → features/example_groups/autogenerated_docstrings.feature} +1 -1
  7. data/{stories/example_groups/example_group_with_should_methods → features/example_groups/example_group_with_should_methods.feature} +3 -3
  8. data/{stories/example_groups/nested_groups → features/example_groups/nested_groups.feature} +1 -1
  9. data/{stories/example_groups/output → features/example_groups/output.feature} +3 -8
  10. data/{stories/interop/examples_and_tests_together → features/interop/examples_and_tests_together.feature} +5 -4
  11. data/{stories/interop/test_but_not_test_unit → features/interop/test_but_not_test_unit.feature} +2 -2
  12. data/{stories/interop/test_case_with_should_methods → features/interop/test_case_with_should_methods.feature} +2 -2
  13. data/{stories/mock_framework_integration/use_flexmock.story → features/mock_framework_integration/use_flexmock.feature} +1 -1
  14. data/features/step_definitions/running_rspec.rb +48 -0
  15. data/features/support/env.rb +25 -0
  16. data/{stories/resources → features/support}/helpers/cmdline.rb +0 -0
  17. data/{stories/resources → features/support}/helpers/story_helper.rb +0 -0
  18. data/{stories/resources → features/support}/matchers/smart_match.rb +0 -0
  19. data/{plugins → lib/adapters}/mock_frameworks/flexmock.rb +0 -0
  20. data/{plugins → lib/adapters}/mock_frameworks/mocha.rb +0 -0
  21. data/{plugins → lib/adapters}/mock_frameworks/rr.rb +0 -0
  22. data/{plugins → lib/adapters}/mock_frameworks/rspec.rb +1 -1
  23. data/lib/autotest/rspec.rb +3 -2
  24. data/lib/spec/dsl/main.rb +8 -4
  25. data/lib/spec/example/configuration.rb +1 -1
  26. data/lib/spec/example/example_group_factory.rb +6 -2
  27. data/lib/spec/example/example_group_methods.rb +47 -54
  28. data/lib/spec/example/shared_example_group.rb +2 -2
  29. data/lib/spec/example.rb +163 -14
  30. data/lib/spec/interop/test/unit/testresult.rb +1 -1
  31. data/lib/spec/interop/test/unit/testsuite_adapter.rb +1 -1
  32. data/lib/spec/matchers/match_array.rb +75 -0
  33. data/lib/spec/matchers/operator_matcher.rb +34 -7
  34. data/lib/spec/matchers.rb +2 -1
  35. data/lib/spec/mocks/argument_constraints.rb +43 -5
  36. data/lib/spec/runner/example_group_runner.rb +2 -2
  37. data/lib/spec/runner/option_parser.rb +12 -6
  38. data/lib/spec/runner/options.rb +9 -9
  39. data/lib/spec/runner/spec_parser.rb +3 -2
  40. data/lib/spec/runner.rb +54 -188
  41. data/lib/spec/version.rb +1 -1
  42. data/lib/spec.rb +0 -29
  43. data/{rake_tasks → resources/rake}/examples.rake +0 -0
  44. data/{rake_tasks → resources/rake}/examples_with_rcov.rake +0 -0
  45. data/{rake_tasks → resources/rake}/failing_examples_with_html.rake +0 -0
  46. data/{rake_tasks → resources/rake}/verify_rcov.rake +0 -0
  47. data/{stories/resources → resources}/spec/before_blocks_example.rb +1 -1
  48. data/{stories/resources → resources}/spec/example_group_with_should_methods.rb +1 -1
  49. data/{stories/resources → resources}/spec/simple_spec.rb +1 -1
  50. data/resources/spec/spec_with_flexmock.rb +19 -0
  51. data/{stories/resources → resources}/test/spec_and_test_together.rb +1 -1
  52. data/{stories/resources → resources}/test/spec_including_test_but_not_unit.rb +1 -1
  53. data/{stories/resources → resources}/test/test_case_with_should_methods.rb +2 -2
  54. data/rspec.gemspec +5 -4
  55. data/spec/autotest/rspec_spec.rb +2 -1
  56. data/spec/spec/dsl/main_spec.rb +8 -5
  57. data/spec/spec/example/configuration_spec.rb +9 -9
  58. data/spec/spec/example/example_group_factory_spec.rb +22 -3
  59. data/spec/spec/example/example_group_methods_spec.rb +19 -15
  60. data/spec/spec/example/example_group_spec.rb +41 -41
  61. data/spec/spec/example/example_methods_spec.rb +5 -5
  62. data/spec/spec/example/helper_method_spec.rb +24 -0
  63. data/spec/spec/example/pending_module_spec.rb +2 -8
  64. data/spec/spec/example/shared_example_group_spec.rb +5 -5
  65. data/spec/spec/matchers/description_generation_spec.rb +5 -0
  66. data/spec/spec/matchers/handler_spec.rb +7 -7
  67. data/spec/spec/matchers/match_array_spec.rb +83 -0
  68. data/spec/spec/matchers/raise_error_spec.rb +18 -0
  69. data/spec/spec/mocks/hash_including_matcher_spec.rb +39 -2
  70. data/spec/spec/mocks/hash_not_including_matcher_spec.rb +67 -0
  71. data/spec/spec/mocks/mock_spec.rb +5 -6
  72. data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
  73. data/spec/spec/runner/formatter/base_text_formatter_spec.rb +22 -0
  74. data/spec/spec/runner/option_parser_spec.rb +4 -17
  75. data/spec/spec/runner/options_spec.rb +19 -5
  76. data/spec/spec/runner/resources/custom_example_group_runner.rb +14 -0
  77. data/spec/spec/runner/spec_parser_spec.rb +10 -0
  78. data/spec/spec/spec_spec.rb +21 -0
  79. metadata +39 -49
  80. data/lib/spec/adapters/ruby_engine/mri.rb +0 -8
  81. data/lib/spec/adapters/ruby_engine/rubinius.rb +0 -8
  82. data/lib/spec/adapters/ruby_engine.rb +0 -26
  83. data/lib/spec/adapters.rb +0 -1
  84. data/lib/spec/extensions/class.rb +0 -24
  85. data/lib/spec/extensions.rb +0 -1
  86. data/spec/spec/adapters/ruby_engine_spec.rb +0 -16
  87. data/stories/all.rb +0 -5
  88. data/stories/configuration/stories.rb +0 -7
  89. data/stories/example_groups/stories.rb +0 -7
  90. data/stories/helper.rb +0 -6
  91. data/stories/interop/stories.rb +0 -7
  92. data/stories/mock_framework_integration/stories.rb +0 -7
  93. data/stories/pending_stories/README +0 -3
  94. data/stories/resources/spec/spec_with_flexmock.rb +0 -18
  95. data/stories/resources/steps/running_rspec.rb +0 -50
  96. data/stories/resources/stories/failing_story.rb +0 -15
  97. data/stories/stories/multiline_steps.story +0 -23
  98. data/stories/stories/steps/multiline_steps.rb +0 -13
  99. data/stories/stories/stories.rb +0 -6
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dchelimsky-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.11.1
4
+ version: 1.1.11.2
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-11-24 00:00:00 -08:00
12
+ date: 2008-12-18 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -87,14 +87,28 @@ files:
87
87
  - examples/passing/stack_spec_with_nested_example_groups.rb
88
88
  - examples/passing/stubbing_example.rb
89
89
  - examples/passing/yielding_example.rb
90
+ - features/configuration/before_blocks.feature
91
+ - features/example_groups/autogenerated_docstrings.feature
92
+ - features/example_groups/example_group_with_should_methods.feature
93
+ - features/example_groups/nested_groups.feature
94
+ - features/example_groups/output.feature
95
+ - features/interop/examples_and_tests_together.feature
96
+ - features/interop/test_but_not_test_unit.feature
97
+ - features/interop/test_case_with_should_methods.feature
98
+ - features/mock_framework_integration/use_flexmock.feature
99
+ - features/step_definitions/running_rspec.rb
100
+ - features/support/env.rb
101
+ - features/support/helpers/cmdline.rb
102
+ - features/support/helpers/story_helper.rb
103
+ - features/support/matchers/smart_match.rb
90
104
  - init.rb
105
+ - lib/adapters/mock_frameworks/flexmock.rb
106
+ - lib/adapters/mock_frameworks/mocha.rb
107
+ - lib/adapters/mock_frameworks/rr.rb
108
+ - lib/adapters/mock_frameworks/rspec.rb
91
109
  - lib/autotest/discover.rb
92
110
  - lib/autotest/rspec.rb
93
111
  - lib/spec.rb
94
- - lib/spec/adapters.rb
95
- - lib/spec/adapters/ruby_engine.rb
96
- - lib/spec/adapters/ruby_engine/mri.rb
97
- - lib/spec/adapters/ruby_engine/rubinius.rb
98
112
  - lib/spec/dsl.rb
99
113
  - lib/spec/dsl/main.rb
100
114
  - lib/spec/example.rb
@@ -117,8 +131,6 @@ files:
117
131
  - lib/spec/expectations/extensions/string_and_symbol.rb
118
132
  - lib/spec/expectations/handler.rb
119
133
  - lib/spec/expectations/wrap_expectation.rb
120
- - lib/spec/extensions.rb
121
- - lib/spec/extensions/class.rb
122
134
  - lib/spec/interop/test.rb
123
135
  - lib/spec/interop/test/unit/autorunner.rb
124
136
  - lib/spec/interop/test/unit/testcase.rb
@@ -138,6 +150,7 @@ files:
138
150
  - lib/spec/matchers/have.rb
139
151
  - lib/spec/matchers/include.rb
140
152
  - lib/spec/matchers/match.rb
153
+ - lib/spec/matchers/match_array.rb
141
154
  - lib/spec/matchers/method_missing.rb
142
155
  - lib/spec/matchers/operator_matcher.rb
143
156
  - lib/spec/matchers/raise_error.rb
@@ -208,14 +221,17 @@ files:
208
221
  - lib/spec/story/story.rb
209
222
  - lib/spec/story/world.rb
210
223
  - lib/spec/version.rb
211
- - plugins/mock_frameworks/flexmock.rb
212
- - plugins/mock_frameworks/mocha.rb
213
- - plugins/mock_frameworks/rr.rb
214
- - plugins/mock_frameworks/rspec.rb
215
- - rake_tasks/examples.rake
216
- - rake_tasks/examples_with_rcov.rake
217
- - rake_tasks/failing_examples_with_html.rake
218
- - rake_tasks/verify_rcov.rake
224
+ - resources/rake/examples.rake
225
+ - resources/rake/examples_with_rcov.rake
226
+ - resources/rake/failing_examples_with_html.rake
227
+ - resources/rake/verify_rcov.rake
228
+ - resources/spec/before_blocks_example.rb
229
+ - resources/spec/example_group_with_should_methods.rb
230
+ - resources/spec/simple_spec.rb
231
+ - resources/spec/spec_with_flexmock.rb
232
+ - resources/test/spec_and_test_together.rb
233
+ - resources/test/spec_including_test_but_not_unit.rb
234
+ - resources/test/test_case_with_should_methods.rb
219
235
  - rspec.gemspec
220
236
  - spec/README.jruby
221
237
  - spec/autotest/autotest_helper.rb
@@ -226,7 +242,6 @@ files:
226
242
  - spec/rspec_suite.rb
227
243
  - spec/ruby_forker.rb
228
244
  - spec/spec.opts
229
- - spec/spec/adapters/ruby_engine_spec.rb
230
245
  - spec/spec/dsl/main_spec.rb
231
246
  - spec/spec/example/configuration_spec.rb
232
247
  - spec/spec/example/example_group_class_definition_spec.rb
@@ -236,6 +251,7 @@ files:
236
251
  - spec/spec/example/example_matcher_spec.rb
237
252
  - spec/spec/example/example_methods_spec.rb
238
253
  - spec/spec/example/example_runner_spec.rb
254
+ - spec/spec/example/helper_method_spec.rb
239
255
  - spec/spec/example/nested_example_group_spec.rb
240
256
  - spec/spec/example/pending_module_spec.rb
241
257
  - spec/spec/example/predicate_matcher_spec.rb
@@ -268,6 +284,7 @@ files:
268
284
  - spec/spec/matchers/has_spec.rb
269
285
  - spec/spec/matchers/have_spec.rb
270
286
  - spec/spec/matchers/include_spec.rb
287
+ - spec/spec/matchers/match_array_spec.rb
271
288
  - spec/spec/matchers/match_spec.rb
272
289
  - spec/spec/matchers/matcher_methods_spec.rb
273
290
  - spec/spec/matchers/mock_constraint_matchers_spec.rb
@@ -293,6 +310,7 @@ files:
293
310
  - spec/spec/mocks/bug_report_8302_spec.rb
294
311
  - spec/spec/mocks/failing_mock_argument_constraints_spec.rb
295
312
  - spec/spec/mocks/hash_including_matcher_spec.rb
313
+ - spec/spec/mocks/hash_not_including_matcher_spec.rb
296
314
  - spec/spec/mocks/mock_ordering_spec.rb
297
315
  - spec/spec/mocks/mock_space_spec.rb
298
316
  - spec/spec/mocks/mock_spec.rb
@@ -316,6 +334,7 @@ files:
316
334
  - spec/spec/runner/examples.txt
317
335
  - spec/spec/runner/failed.txt
318
336
  - spec/spec/runner/formatter/base_formatter_spec.rb
337
+ - spec/spec/runner/formatter/base_text_formatter_spec.rb
319
338
  - spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb
320
339
  - spec/spec/runner/formatter/failing_examples_formatter_spec.rb
321
340
  - spec/spec/runner/formatter/html_formatted-1.8.4.html
@@ -348,6 +367,7 @@ files:
348
367
  - spec/spec/runner/resources/a_bar.rb
349
368
  - spec/spec/runner/resources/a_foo.rb
350
369
  - spec/spec/runner/resources/a_spec.rb
370
+ - spec/spec/runner/resources/custom_example_group_runner.rb
351
371
  - spec/spec/runner/spec.opts
352
372
  - spec/spec/runner/spec_drb.opts
353
373
  - spec/spec/runner/spec_parser/spec_parser_fixture.rb
@@ -355,6 +375,7 @@ files:
355
375
  - spec/spec/runner/spec_spaced.opts
356
376
  - spec/spec/runner_spec.rb
357
377
  - spec/spec/spec_classes.rb
378
+ - spec/spec/spec_spec.rb
358
379
  - spec/spec/story/builders.rb
359
380
  - spec/spec/story/extensions/main_spec.rb
360
381
  - spec/spec/story/extensions_spec.rb
@@ -374,37 +395,6 @@ files:
374
395
  - spec/spec/story/story_spec.rb
375
396
  - spec/spec/story/world_spec.rb
376
397
  - spec/spec_helper.rb
377
- - stories/all.rb
378
- - stories/configuration/before_blocks.story
379
- - stories/configuration/stories.rb
380
- - stories/example_groups/autogenerated_docstrings
381
- - stories/example_groups/example_group_with_should_methods
382
- - stories/example_groups/nested_groups
383
- - stories/example_groups/output
384
- - stories/example_groups/stories.rb
385
- - stories/helper.rb
386
- - stories/interop/examples_and_tests_together
387
- - stories/interop/stories.rb
388
- - stories/interop/test_but_not_test_unit
389
- - stories/interop/test_case_with_should_methods
390
- - stories/mock_framework_integration/stories.rb
391
- - stories/mock_framework_integration/use_flexmock.story
392
- - stories/pending_stories/README
393
- - stories/resources/helpers/cmdline.rb
394
- - stories/resources/helpers/story_helper.rb
395
- - stories/resources/matchers/smart_match.rb
396
- - stories/resources/spec/before_blocks_example.rb
397
- - stories/resources/spec/example_group_with_should_methods.rb
398
- - stories/resources/spec/simple_spec.rb
399
- - stories/resources/spec/spec_with_flexmock.rb
400
- - stories/resources/steps/running_rspec.rb
401
- - stories/resources/stories/failing_story.rb
402
- - stories/resources/test/spec_and_test_together.rb
403
- - stories/resources/test/spec_including_test_but_not_unit.rb
404
- - stories/resources/test/test_case_with_should_methods.rb
405
- - stories/stories/multiline_steps.story
406
- - stories/stories/steps/multiline_steps.rb
407
- - stories/stories/stories.rb
408
398
  - story_server/prototype/javascripts/builder.js
409
399
  - story_server/prototype/javascripts/controls.js
410
400
  - story_server/prototype/javascripts/dragdrop.js
@@ -445,6 +435,6 @@ rubyforge_project: rspec
445
435
  rubygems_version: 1.2.0
446
436
  signing_key:
447
437
  specification_version: 2
448
- summary: rspec 1.1.11.1
438
+ summary: rspec 1.1.11.2
449
439
  test_files: []
450
440
 
@@ -1,8 +0,0 @@
1
- module Spec
2
- module Adapters
3
- module RubyEngine
4
- class MRI
5
- end
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- module Spec
2
- module Adapters
3
- module RubyEngine
4
- class Rubinius
5
- end
6
- end
7
- end
8
- end
@@ -1,26 +0,0 @@
1
- require 'spec/adapters/ruby_engine/mri'
2
- require 'spec/adapters/ruby_engine/rubinius'
3
-
4
- module Spec
5
- module Adapters
6
- module RubyEngine
7
-
8
- ENGINES = {
9
- 'mri' => MRI.new,
10
- 'rbx' => Rubinius.new
11
- }
12
-
13
- def self.engine
14
- if Object.const_defined?('RUBY_ENGINE')
15
- return Object.const_get('RUBY_ENGINE')
16
- else
17
- return 'mri'
18
- end
19
- end
20
-
21
- def self.adapter
22
- return ENGINES[engine]
23
- end
24
- end
25
- end
26
- end
data/lib/spec/adapters.rb DELETED
@@ -1 +0,0 @@
1
- require 'spec/adapters/ruby_engine'
@@ -1,24 +0,0 @@
1
- class Class
2
- # Creates a new subclass of self, with a name "under" our own name.
3
- # Example:
4
- #
5
- # x = Foo::Bar.subclass('Zap'){}
6
- # x.name # => Foo::Bar::Zap_1
7
- # x.superclass.name # => Foo::Bar
8
- def subclass(base_name, &body)
9
- klass = Class.new(self)
10
- class_name = "#{base_name}_#{class_count!}"
11
- instance_eval do
12
- const_set(class_name, klass)
13
- end
14
- klass.instance_eval(&body)
15
- klass
16
- end
17
-
18
- private
19
- def class_count!
20
- @class_count ||= 0
21
- @class_count += 1
22
- @class_count
23
- end
24
- end
@@ -1 +0,0 @@
1
- require 'spec/extensions/class'
@@ -1,16 +0,0 @@
1
- describe Spec::Adapters::RubyEngine do
2
- it "should default to MRI" do
3
- Spec::Adapters::RubyEngine.adapter.should be_an_instance_of(Spec::Adapters::RubyEngine::MRI)
4
- end
5
-
6
- it "should provide Rubinius for rbx" do
7
- Spec::Adapters::RubyEngine.stub!(:engine).and_return('rbx')
8
- Spec::Adapters::RubyEngine.adapter.should be_an_instance_of(Spec::Adapters::RubyEngine::Rubinius)
9
- end
10
-
11
- it "should try to find whatever is defined by the RUBY_ENGINE const" do
12
- Object.stub!(:const_defined?).with('RUBY_ENGINE').and_return(true)
13
- Object.stub!(:const_get).with('RUBY_ENGINE').and_return("xyz")
14
- Spec::Adapters::RubyEngine.engine.should == "xyz"
15
- end
16
- end
data/stories/all.rb DELETED
@@ -1,5 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[helper])
2
-
3
- %w[configuration example_groups interop mock_framework_integration stories].each do |dir|
4
- require File.join(File.dirname(__FILE__), "#{dir}/stories")
5
- end
@@ -1,7 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. helper])
2
-
3
- with_steps_for :running_rspec do
4
- Dir["#{File.dirname(__FILE__)}/*"].each do |file|
5
- run file if File.file?(file) && !(file =~ /\.rb$/)
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. helper])
2
-
3
- with_steps_for :running_rspec do
4
- Dir["#{File.dirname(__FILE__)}/*"].each do |file|
5
- run file if File.file?(file) && !(file =~ /\.rb$/)
6
- end
7
- end
data/stories/helper.rb DELETED
@@ -1,6 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../lib")
2
- require 'spec'
3
- require 'tempfile'
4
- require File.join(File.dirname(__FILE__), *%w[resources matchers smart_match])
5
- require File.join(File.dirname(__FILE__), *%w[resources helpers story_helper])
6
- require File.join(File.dirname(__FILE__), *%w[resources steps running_rspec])
@@ -1,7 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. helper])
2
-
3
- with_steps_for :running_rspec do
4
- Dir["#{File.dirname(__FILE__)}/*"].each do |file|
5
- run file if File.file?(file) && !(file =~ /\.rb$/)
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. helper])
2
-
3
- with_steps_for :running_rspec do
4
- Dir["#{File.dirname(__FILE__)}/*"].each do |file|
5
- run file if File.file?(file) && !(file =~ /\.rb$/)
6
- end
7
- end
@@ -1,3 +0,0 @@
1
- This directory contains stories that are currently not passing
2
- because they are new or they represent regressions.
3
-
@@ -1,18 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
2
- require "rubygems"
3
- require 'spec'
4
-
5
- Spec::Runner.configure do |config|
6
- config.mock_with :flexmock
7
- end
8
-
9
- # This is to ensure that requiring spec/mocks/framework doesn't interfere w/ flexmock
10
- require 'spec/mocks/framework'
11
-
12
- describe "something" do
13
- it "should receive some message" do
14
- target = Object.new
15
- flexmock(target).should_receive(:foo).once
16
- lambda {flexmock_verify}.should raise_error
17
- end
18
- end
@@ -1,50 +0,0 @@
1
- steps_for :running_rspec do
2
-
3
- Given("the file $relative_path") do |relative_path|
4
- @path = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "resources", relative_path))
5
- unless File.exist?(@path)
6
- raise "could not find file at #{@path}"
7
- end
8
- end
9
-
10
- When("I run it with the $interpreter") do |interpreter|
11
- stderr_file = Tempfile.new('rspec')
12
- stderr_file.close
13
- @stdout = case(interpreter)
14
- when /^ruby interpreter/
15
- args = interpreter.gsub('ruby interpreter','')
16
- ruby("#{@path}#{args}", stderr_file.path)
17
- when /^spec script/
18
- args = interpreter.gsub('spec script','')
19
- spec("#{@path}#{args}", stderr_file.path)
20
- when 'CommandLine object' then cmdline(@path, stderr_file.path)
21
- else raise "Unknown interpreter: #{interpreter}"
22
- end
23
- @stderr = IO.read(stderr_file.path)
24
- @exit_code = $?.to_i
25
- end
26
-
27
- Then("the exit code should be $exit_code") do |exit_code|
28
- if @exit_code != exit_code.to_i
29
- raise "Did not exit with #{exit_code}, but with #{@exit_code}. Standard error:\n#{@stderr}"
30
- end
31
- end
32
-
33
- Then("the $stream should match $regex") do |stream, string_or_regex|
34
- written = case(stream)
35
- when 'stdout' then @stdout
36
- when 'stderr' then @stderr
37
- else raise "Unknown stream: #{stream}"
38
- end
39
- written.should smart_match(string_or_regex)
40
- end
41
-
42
- Then("the $stream should not match $regex") do |stream, string_or_regex|
43
- written = case(stream)
44
- when 'stdout' then @stdout
45
- when 'stderr' then @stderr
46
- else raise "Unknown stream: #{stream}"
47
- end
48
- written.should_not smart_match(string_or_regex)
49
- end
50
- end
@@ -1,15 +0,0 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
2
-
3
- require 'spec/story'
4
-
5
- Story "Failing story",
6
- %(As an RSpec user
7
- I want a failing test
8
- So that I can observe the output) do
9
-
10
- Scenario "Failing scenario" do
11
- Then "true should be false" do
12
- true.should == false
13
- end
14
- end
15
- end
@@ -1,23 +0,0 @@
1
- Story: multiline steps in plain text stories
2
-
3
- As a plain text story writer
4
- I want to write steps with multiline arguments
5
-
6
- Scenario: two lines
7
-
8
- Given I have a two line step with this text:
9
- This is the first line
10
- # This, by the way, is just a comment
11
- plus this is the second line
12
-
13
- # This, by the way, is just a comment
14
-
15
- When I have a When with the same two lines:
16
- This is the first line
17
- plus this is the second line
18
-
19
- Then it should match:
20
- This is the first line
21
- plus this is the second line
22
-
23
- # And here is another comment
@@ -1,13 +0,0 @@
1
- steps_for :multiline_steps do
2
- Given "I have a two line step with this text:$text" do |text|
3
- @text = text
4
- end
5
-
6
- When "I have a When with the same two lines:$text" do |text|
7
- text.should == @text
8
- end
9
-
10
- Then "it should match:$text" do |text|
11
- text.should == @text
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- require File.join(File.dirname(__FILE__), *%w[.. helper])
2
- require File.join(File.dirname(__FILE__), *%w[steps multiline_steps])
3
-
4
- with_steps_for :multiline_steps do
5
- run File.dirname(__FILE__) + "/multiline_steps.story"
6
- end