dchelimsky-rspec 1.1.99.5 → 1.1.99.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -27,6 +27,7 @@ WARNINGS:
27
27
  * added spec/test/unit as more intuitive path to loading test/unit interop lib
28
28
  * added explicit autorun feature for running specs with ruby command
29
29
  * added handling for does_not_match? for matchers that want to know the context in which they were called
30
+ * lots of ruby 1.9.1 compatibility fixes from Chad Humprhies
30
31
 
31
32
  * bug fixes
32
33
 
data/Manifest.txt CHANGED
@@ -4,6 +4,7 @@ License.txt
4
4
  Manifest.txt
5
5
  README.txt
6
6
  Rakefile
7
+ Ruby1.9.markdown
7
8
  TODO.txt
8
9
  bin/autospec
9
10
  bin/spec
data/Ruby1.9.markdown ADDED
@@ -0,0 +1,32 @@
1
+ # RSpec and Ruby 1.9
2
+
3
+ Currently, RSpec (core) is mostly compatible with Ruby 1.9.1. There are still
4
+ outstanding issues, some of which we plan to address and some we don't.
5
+
6
+ ## Test::Unit
7
+
8
+ RSpec/Test::Unit interop will run with the test-unit-1.2.3 gem, but you must install it.
9
+
10
+ ## Class Variables
11
+
12
+ Due to changes in scoping rules, class variables within example groups are not
13
+ supported in Ruby 1.9.
14
+
15
+ describe "a class variable" do
16
+ @@class_variable = "a class variable"
17
+
18
+ it "can access class variables in examples in Ruby 1.8" do
19
+ with_ruby 1.8 do
20
+ @@class_variable.should == "a class variable"
21
+ end
22
+ end
23
+
24
+ it "can NOT access class variables in examples in Ruby 1.9" do
25
+ with_ruby 1.9 do
26
+ lambda do
27
+ @@class_variable.should == "a class variable"
28
+ end.should raise_error(NameError)
29
+ end
30
+ end
31
+ end
32
+
data/TODO.txt CHANGED
@@ -15,7 +15,8 @@ Refactoring for 1.2.0
15
15
 
16
16
  == Ruby 1.9.1
17
17
 
18
- * no heckle (for now)
18
+ * one example remains failing
19
+ * cucumber isn't working yet
19
20
 
20
21
  == rspec-2.0
21
22
 
@@ -3,9 +3,9 @@ module Spec
3
3
  class ExamplePendingError < StandardError
4
4
  attr_reader :pending_caller
5
5
 
6
- def initialize(message=nil)
7
- super
8
- @pending_caller = caller[2]
6
+ def initialize(message=nil, pending_caller=nil)
7
+ super(message)
8
+ @pending_caller = pending_caller || caller[2]
9
9
  end
10
10
  end
11
11
 
@@ -2,15 +2,16 @@ module Spec
2
2
  module Example
3
3
  module Pending
4
4
  def pending(message = "TODO")
5
+ pending_caller = caller[0]
5
6
  if block_given?
6
7
  begin
7
8
  yield
8
9
  rescue Exception => e
9
- raise Spec::Example::ExamplePendingError.new(message)
10
+ raise Spec::Example::ExamplePendingError.new(message, pending_caller)
10
11
  end
11
12
  raise Spec::Example::PendingExampleFixedError.new("Expected pending '#{message}' to fail. No Error was raised.")
12
13
  else
13
- raise Spec::Example::ExamplePendingError.new(message)
14
+ raise Spec::Example::ExamplePendingError.new(message, pending_caller)
14
15
  end
15
16
  end
16
17
  end
@@ -1,3 +1,7 @@
1
+ if Spec::Ruby.version.to_f >= 1.9
2
+ gem 'test-unit','1.2.3'
3
+ end
4
+
1
5
  require 'spec'
2
6
  require 'test/unit'
3
7
  require 'test/unit/testresult'
@@ -6,11 +6,11 @@ module Spec
6
6
  end
7
7
 
8
8
  def load_files(files)
9
+ $KCODE = 'u' if RUBY_VERSION.to_f < 1.9
9
10
  # It's important that loading files (or choosing not to) stays the
10
11
  # responsibility of the ExampleGroupRunner. Some implementations (like)
11
12
  # the one using DRb may choose *not* to load files, but instead tell
12
13
  # someone else to do it over the wire.
13
- $KCODE = 'u' if RUBY_VERSION < '1.9'
14
14
  files.each do |file|
15
15
  load file
16
16
  end
data/lib/spec/version.rb CHANGED
@@ -4,7 +4,7 @@ module Spec
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
6
  TINY = 99
7
- MINESCULE = 5
7
+ MINESCULE = 6
8
8
 
9
9
 
10
10
  STRING = [MAJOR, MINOR, TINY, MINESCULE].compact.join('.')
data/rspec.gemspec CHANGED
@@ -2,23 +2,23 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rspec}
5
- s.version = "1.1.99.5"
5
+ s.version = "1.1.99.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["RSpec Development Team"]
9
- s.date = %q{2009-02-12}
9
+ s.date = %q{2009-02-15}
10
10
  s.description = %q{Behaviour Driven Development for Ruby.}
11
11
  s.email = ["rspec-devel@rubyforge.org"]
12
12
  s.executables = ["autospec", "spec"]
13
13
  s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/failing/README.txt", "examples/passing/priority.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
14
- s.files = [".autotest", "History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "cucumber.yml", "examples/failing/README.txt", "examples/failing/diffing_spec.rb", "examples/failing/failing_autogenerated_docstrings_example.rb", "examples/failing/failure_in_after.rb", "examples/failing/failure_in_before.rb", "examples/failing/mocking_example.rb", "examples/failing/mocking_with_flexmock.rb", "examples/failing/mocking_with_mocha.rb", "examples/failing/mocking_with_rr.rb", "examples/failing/partial_mock_example.rb", "examples/failing/predicate_example.rb", "examples/failing/raising_example.rb", "examples/failing/spec_helper.rb", "examples/failing/syntax_error_example.rb", "examples/failing/team_spec.rb", "examples/failing/timeout_behaviour.rb", "examples/passing/autogenerated_docstrings_example.rb", "examples/passing/before_and_after_example.rb", "examples/passing/behave_as_example.rb", "examples/passing/custom_expectation_matchers.rb", "examples/passing/custom_formatter.rb", "examples/passing/dynamic_spec.rb", "examples/passing/file_accessor.rb", "examples/passing/file_accessor_spec.rb", "examples/passing/filtered_formatter.rb", "examples/passing/filtered_formatter_example.rb", "examples/passing/greeter_spec.rb", "examples/passing/helper_method_example.rb", "examples/passing/io_processor.rb", "examples/passing/io_processor_spec.rb", "examples/passing/mocking_example.rb", "examples/passing/multi_threaded_example_group_runner.rb", "examples/passing/nested_classes_example.rb", "examples/passing/partial_mock_example.rb", "examples/passing/pending_example.rb", "examples/passing/predicate_example.rb", "examples/passing/priority.txt", "examples/passing/shared_example_group_example.rb", "examples/passing/shared_stack_examples.rb", "examples/passing/simple_matcher_example.rb", "examples/passing/spec_helper.rb", "examples/passing/stack.rb", "examples/passing/stack_spec.rb", "examples/passing/stack_spec_with_nested_example_groups.rb", "examples/passing/stubbing_example.rb", "examples/passing/yielding_example.rb", "examples/ruby1.9.compatibility/access_to_constants_spec.rb", "features-pending/cli/conditional_exclusion.feature", "features/before_and_after_blocks/before_and_after_blocks.feature", "features/example_groups/autogenerated_docstrings.feature", "features/example_groups/example_group_with_should_methods.feature", "features/example_groups/nested_groups.feature", "features/example_groups/output.feature", "features/heckle/heckle.feature", "features/interop/examples_and_tests_together.feature", "features/interop/test_but_not_test_unit.feature", "features/interop/test_case_with_should_methods.feature", "features/mock_framework_integration/use_flexmock.feature", "features/mock_framework_integration/use_mocha.feature", "features/mock_framework_integration/use_rr.feature", "features/step_definitions/running_rspec.rb", "features/support/env.rb", "features/support/matchers/smart_match.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters/mock_frameworks/flexmock.rb", "lib/spec/adapters/mock_frameworks/mocha.rb", "lib/spec/adapters/mock_frameworks/rr.rb", "lib/spec/adapters/mock_frameworks/rspec.rb", "lib/spec/autorun.rb", "lib/spec/dsl.rb", "lib/spec/dsl/main.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_description.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_hierarchy.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/predicate_matchers.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/example/subject.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/handler.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/errors.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/generated_descriptions.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/match_array.rb", "lib/spec/matchers/method_missing.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/matchers/wrap_expectation.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/argument_matchers.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/ruby.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/configuration.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/test/unit.rb", "lib/spec/version.rb", "resources/helpers/cmdline.rb", "resources/rake/examples.rake", "resources/rake/examples_with_rcov.rake", "resources/rake/failing_examples_with_html.rake", "resources/rake/verify_rcov.rake", "resources/spec/example_group_with_should_methods.rb", "resources/spec/simple_spec.rb", "resources/test/spec_and_test_together.rb", "resources/test/spec_including_test_but_not_unit.rb", "resources/test/test_case_with_should_methods.rb", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/failed_results_re_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/dsl/main_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/helper_method_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/expectations/wrap_expectation_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_array_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496_spec.rb", "spec/spec/mocks/bug_report_600_spec.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_argument_matchers_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/hash_not_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_argument_matchers_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/stubbed_message_expectations_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/configuration_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/example_group_runner_spec.rb", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/base_text_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatted-1.8.7.html", "spec/spec/runner/formatter/html_formatted-1.9.1.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.7.html", "spec/spec/runner/formatter/text_mate_formatted-1.9.1.html", "spec/spec/runner/formatter/text_mate_formatter_spec.rb", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/resources/custom_example_group_runner.rb", "spec/spec/runner/resources/utf8_encoded.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec_helper.rb"]
14
+ s.files = [".autotest", "History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "Ruby1.9.markdown", "TODO.txt", "bin/autospec", "bin/spec", "cucumber.yml", "examples/failing/README.txt", "examples/failing/diffing_spec.rb", "examples/failing/failing_autogenerated_docstrings_example.rb", "examples/failing/failure_in_after.rb", "examples/failing/failure_in_before.rb", "examples/failing/mocking_example.rb", "examples/failing/mocking_with_flexmock.rb", "examples/failing/mocking_with_mocha.rb", "examples/failing/mocking_with_rr.rb", "examples/failing/partial_mock_example.rb", "examples/failing/predicate_example.rb", "examples/failing/raising_example.rb", "examples/failing/spec_helper.rb", "examples/failing/syntax_error_example.rb", "examples/failing/team_spec.rb", "examples/failing/timeout_behaviour.rb", "examples/passing/autogenerated_docstrings_example.rb", "examples/passing/before_and_after_example.rb", "examples/passing/behave_as_example.rb", "examples/passing/custom_expectation_matchers.rb", "examples/passing/custom_formatter.rb", "examples/passing/dynamic_spec.rb", "examples/passing/file_accessor.rb", "examples/passing/file_accessor_spec.rb", "examples/passing/filtered_formatter.rb", "examples/passing/filtered_formatter_example.rb", "examples/passing/greeter_spec.rb", "examples/passing/helper_method_example.rb", "examples/passing/io_processor.rb", "examples/passing/io_processor_spec.rb", "examples/passing/mocking_example.rb", "examples/passing/multi_threaded_example_group_runner.rb", "examples/passing/nested_classes_example.rb", "examples/passing/partial_mock_example.rb", "examples/passing/pending_example.rb", "examples/passing/predicate_example.rb", "examples/passing/priority.txt", "examples/passing/shared_example_group_example.rb", "examples/passing/shared_stack_examples.rb", "examples/passing/simple_matcher_example.rb", "examples/passing/spec_helper.rb", "examples/passing/stack.rb", "examples/passing/stack_spec.rb", "examples/passing/stack_spec_with_nested_example_groups.rb", "examples/passing/stubbing_example.rb", "examples/passing/yielding_example.rb", "examples/ruby1.9.compatibility/access_to_constants_spec.rb", "features-pending/cli/conditional_exclusion.feature", "features/before_and_after_blocks/before_and_after_blocks.feature", "features/example_groups/autogenerated_docstrings.feature", "features/example_groups/example_group_with_should_methods.feature", "features/example_groups/nested_groups.feature", "features/example_groups/output.feature", "features/heckle/heckle.feature", "features/interop/examples_and_tests_together.feature", "features/interop/test_but_not_test_unit.feature", "features/interop/test_case_with_should_methods.feature", "features/mock_framework_integration/use_flexmock.feature", "features/mock_framework_integration/use_mocha.feature", "features/mock_framework_integration/use_rr.feature", "features/step_definitions/running_rspec.rb", "features/support/env.rb", "features/support/matchers/smart_match.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters/mock_frameworks/flexmock.rb", "lib/spec/adapters/mock_frameworks/mocha.rb", "lib/spec/adapters/mock_frameworks/rr.rb", "lib/spec/adapters/mock_frameworks/rspec.rb", "lib/spec/autorun.rb", "lib/spec/dsl.rb", "lib/spec/dsl/main.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_description.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_hierarchy.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/predicate_matchers.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/example/subject.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/handler.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/errors.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/generated_descriptions.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/match_array.rb", "lib/spec/matchers/method_missing.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/matchers/wrap_expectation.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/argument_matchers.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/ruby.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/configuration.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/test/unit.rb", "lib/spec/version.rb", "resources/helpers/cmdline.rb", "resources/rake/examples.rake", "resources/rake/examples_with_rcov.rake", "resources/rake/failing_examples_with_html.rake", "resources/rake/verify_rcov.rake", "resources/spec/example_group_with_should_methods.rb", "resources/spec/simple_spec.rb", "resources/test/spec_and_test_together.rb", "resources/test/spec_including_test_but_not_unit.rb", "resources/test/test_case_with_should_methods.rb", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/failed_results_re_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/dsl/main_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/helper_method_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/expectations/wrap_expectation_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_array_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496_spec.rb", "spec/spec/mocks/bug_report_600_spec.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_argument_matchers_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/hash_not_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_argument_matchers_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/stubbed_message_expectations_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/configuration_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/example_group_runner_spec.rb", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/base_text_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatted-1.8.7.html", "spec/spec/runner/formatter/html_formatted-1.9.1.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.7.html", "spec/spec/runner/formatter/text_mate_formatted-1.9.1.html", "spec/spec/runner/formatter/text_mate_formatter_spec.rb", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/resources/custom_example_group_runner.rb", "spec/spec/runner/resources/utf8_encoded.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec_helper.rb"]
15
15
  s.has_rdoc = true
16
16
  s.homepage = %q{http://rspec.info/}
17
17
  s.rdoc_options = ["--main", "README.txt"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = %q{rspec}
20
20
  s.rubygems_version = %q{1.3.1}
21
- s.summary = %q{rspec 1.1.99.5}
21
+ s.summary = %q{rspec 1.1.99.6}
22
22
 
23
23
  if s.respond_to? :specification_version then
24
24
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -1,114 +1,111 @@
1
1
  require File.dirname(__FILE__) + "/autotest_helper"
2
2
 
3
- class Autotest
4
-
5
- describe Rspec do
6
- describe "adding spec.opts --options" do
7
- before(:each) do
8
- @rspec_autotest = Rspec.new
9
- end
3
+ describe Autotest::Rspec do
4
+ describe "adding spec.opts --options" do
5
+ before(:each) do
6
+ @rspec_autotest = Autotest::Rspec.new
7
+ end
10
8
 
11
- it "should return the command line option to add spec.opts if the options file exists" do
12
- File.stub!(:exist?).and_return true
13
- @rspec_autotest.add_options_if_present.should == "-O spec/spec.opts "
14
- end
9
+ it "should return the command line option to add spec.opts if the options file exists" do
10
+ File.stub!(:exist?).and_return true
11
+ @rspec_autotest.add_options_if_present.should == "-O spec/spec.opts "
12
+ end
15
13
 
16
- it "should return an empty string if no spec.opts exists" do
17
- File.stub!(:exist?).and_return false
18
- Rspec.new.add_options_if_present.should == ""
19
- end
20
- end
21
-
22
- describe "commands" do
23
- before(:each) do
24
- @rspec_autotest = Rspec.new
25
- @rspec_autotest.stub!(:ruby).and_return "ruby"
26
- @rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
27
-
28
- @ruby = @rspec_autotest.ruby
29
- @spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
30
- @options = @rspec_autotest.add_options_if_present
31
- @files_to_test = {
32
- :spec => ["file_one", "file_two"]
33
- }
34
- # this is not the inner representation of Autotest!
35
- @rspec_autotest.stub!(:files_to_test).and_return @files_to_test
36
- @files_to_test.stub!(:keys).and_return @files_to_test[:spec]
37
- @to_test = @files_to_test.keys.flatten.join ' '
38
- end
14
+ it "should return an empty string if no spec.opts exists" do
15
+ File.stub!(:exist?).and_return false
16
+ Autotest::Rspec.new.add_options_if_present.should == ""
17
+ end
18
+ end
19
+
20
+ describe "commands" do
21
+ before(:each) do
22
+ @rspec_autotest = Autotest::Rspec.new
23
+ @rspec_autotest.stub!(:ruby).and_return "ruby"
24
+ @rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
39
25
 
40
- it "should make the appropriate test command" do
41
- @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} #{@spec_cmd} #{@to_test} #{@options}"
42
- end
26
+ @ruby = @rspec_autotest.ruby
27
+ @spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
28
+ @options = @rspec_autotest.add_options_if_present
29
+ @files_to_test = {
30
+ :spec => ["file_one", "file_two"]
31
+ }
32
+ # this is not the inner representation of Autotest!
33
+ @rspec_autotest.stub!(:files_to_test).and_return @files_to_test
34
+ @files_to_test.stub!(:keys).and_return @files_to_test[:spec]
35
+ @to_test = @files_to_test.keys.flatten.join ' '
36
+ end
37
+
38
+ it "should make the appropriate test command" do
39
+ @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} #{@spec_cmd} #{@to_test} #{@options}"
40
+ end
43
41
 
44
- it "should return a blank command for no files" do
45
- @rspec_autotest.make_test_cmd({}).should == ''
46
- end
42
+ it "should return a blank command for no files" do
43
+ @rspec_autotest.make_test_cmd({}).should == ''
47
44
  end
45
+ end
46
+
47
+ describe "mappings" do
48
48
 
49
- describe "mappings" do
50
-
51
- before(:each) do
52
- @lib_file = "lib/something.rb"
53
- @spec_file = "spec/something_spec.rb"
54
- @rspec_autotest = Rspec.new
55
- @rspec_autotest.hook :initialize
56
- end
57
-
58
- it "should find the spec file for a given lib file" do
59
- @rspec_autotest.should map_specs([@spec_file]).to(@lib_file)
60
- end
61
-
62
- it "should find the spec file if given a spec file" do
63
- @rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
64
- end
65
-
66
- it "should ignore files in spec dir that aren't specs" do
67
- @rspec_autotest.should map_specs([]).to("spec/spec_helper.rb")
68
- end
69
-
70
- it "should ignore untracked files (in @file)" do
71
- @rspec_autotest.should map_specs([]).to("lib/untracked_file")
72
- end
49
+ before(:each) do
50
+ @lib_file = "lib/something.rb"
51
+ @spec_file = "spec/something_spec.rb"
52
+ @rspec_autotest = Autotest::Rspec.new
53
+ @rspec_autotest.hook :initialize
73
54
  end
74
55
 
75
- describe "consolidating failures" do
76
- before(:each) do
77
- @rspec_autotest = Rspec.new
78
-
79
- @spec_file = "spec/autotest/some_spec.rb"
80
- @rspec_autotest.instance_variable_set("@files", {@spec_file => Time.now})
81
- @rspec_autotest.stub!(:find_files_to_test).and_return true
82
- end
83
-
84
- it "should return no failures if no failures were given in the output" do
85
- @rspec_autotest.consolidate_failures([[]]).should == {}
86
- end
56
+ it "should find the spec file for a given lib file" do
57
+ @rspec_autotest.should map_specs([@spec_file]).to(@lib_file)
58
+ end
59
+
60
+ it "should find the spec file if given a spec file" do
61
+ @rspec_autotest.should map_specs([@spec_file]).to(@spec_file)
62
+ end
63
+
64
+ it "should ignore files in spec dir that aren't specs" do
65
+ @rspec_autotest.should map_specs([]).to("spec/spec_helper.rb")
66
+ end
67
+
68
+ it "should ignore untracked files (in @file)" do
69
+ @rspec_autotest.should map_specs([]).to("lib/untracked_file")
70
+ end
71
+ end
72
+
73
+ describe "consolidating failures" do
74
+ before(:each) do
75
+ @rspec_autotest = Autotest::Rspec.new
87
76
 
88
- it "should return a hash with the spec filename => spec name for each failure or error" do
89
- @rspec_autotest.stub!(:test_files_for).and_return "spec/autotest/some_spec.rb"
90
- failures = [
91
- [
92
- "false should be false",
93
- "expected: true,\n got: false (using ==)\n#{@spec_file}:203:"
94
- ]
77
+ @spec_file = "spec/autotest/some_spec.rb"
78
+ @rspec_autotest.instance_variable_set("@files", {@spec_file => Time.now})
79
+ @rspec_autotest.stub!(:find_files_to_test).and_return true
80
+ end
81
+
82
+ it "should return no failures if no failures were given in the output" do
83
+ @rspec_autotest.consolidate_failures([[]]).should == {}
84
+ end
85
+
86
+ it "should return a hash with the spec filename => spec name for each failure or error" do
87
+ @rspec_autotest.stub!(:test_files_for).and_return "spec/autotest/some_spec.rb"
88
+ failures = [
89
+ [
90
+ "false should be false",
91
+ "expected: true,\n got: false (using ==)\n#{@spec_file}:203:"
95
92
  ]
96
- @rspec_autotest.consolidate_failures(failures).should == {
97
- @spec_file => ["false should be false"]
98
- }
99
- end
100
-
101
- it "should not include the subject file" do
102
- subject_file = "lib/autotest/some.rb"
103
- @rspec_autotest.stub!(:test_files_for).and_return "spec/autotest/some_spec.rb"
104
- failures = [
105
- [
106
- "false should be false",
107
- "expected: true,\n got: false (using ==)\n#{subject_file}:143:\n#{@spec_file}:203:"
108
- ]
93
+ ]
94
+ @rspec_autotest.consolidate_failures(failures).should == {
95
+ @spec_file => ["false should be false"]
96
+ }
97
+ end
98
+
99
+ it "should not include the subject file" do
100
+ subject_file = "lib/autotest/some.rb"
101
+ @rspec_autotest.stub!(:test_files_for).and_return "spec/autotest/some_spec.rb"
102
+ failures = [
103
+ [
104
+ "false should be false",
105
+ "expected: true,\n got: false (using ==)\n#{subject_file}:143:\n#{@spec_file}:203:"
109
106
  ]
110
- @rspec_autotest.consolidate_failures(failures).keys.should_not include(subject_file)
111
- end
107
+ ]
108
+ @rspec_autotest.consolidate_failures(failures).keys.should_not include(subject_file)
112
109
  end
113
110
  end
114
111
  end
@@ -26,8 +26,10 @@ module Spec
26
26
  @instance_variable.should == :instance_variable
27
27
  end
28
28
 
29
- it "can access class variables" do
30
- @@class_variable.should == :class_variable
29
+ it "can access class variables (Ruby 1.8 only)" do
30
+ with_ruby 1.8 do
31
+ @@class_variable.should == :class_variable
32
+ end
31
33
  end
32
34
 
33
35
  it "can access constants" do
@@ -16,11 +16,23 @@ module Spec
16
16
  Bar.should be_loaded
17
17
  end
18
18
 
19
- @@foo = 1
19
+ @@class_variable = "a class variable"
20
20
 
21
- it "should allow class variables to be defined" do
22
- @@foo.should == 1
21
+ it "can access class variables in examples in Ruby 1.8" do
22
+ with_ruby 1.8 do
23
+ @@class_variable.should == "a class variable"
24
+ end
25
+ end
26
+
27
+ it "can NOT access class variables in examples in Ruby 1.9" do
28
+ with_ruby 1.9 do
29
+ lambda do
30
+ @@class_variable.should == "a class variable"
31
+ end.should raise_error(NameError)
32
+ end
23
33
  end
34
+
35
+
24
36
  end
25
37
 
26
38
  class ExampleClassVariablePollutionSpec < ExampleGroup
@@ -28,7 +40,7 @@ module Spec
28
40
 
29
41
  it "should not retain class variables from other Example classes" do
30
42
  proc do
31
- @@foo
43
+ @@class_variable
32
44
  end.should raise_error
33
45
  end
34
46
  end
@@ -1,18 +1,31 @@
1
1
  require File.dirname(__FILE__) + '/../../spec_helper'
2
2
 
3
+ class Thing
4
+ attr_reader :arg
5
+ def initialize(arg=nil)
6
+ @arg = arg || :default
7
+ end
8
+ def ==(other)
9
+ @arg == other.arg
10
+ end
11
+ def eql?(other)
12
+ @arg == other.arg
13
+ end
14
+ end
15
+
3
16
  module Spec
4
17
  module Example
5
18
  describe ExampleMethods do
6
19
  module ModuleThatIsReopened; end
7
20
 
8
- module ExampleMethods
21
+ module Spec::Example::ExampleMethods
9
22
  include ModuleThatIsReopened
10
23
  end
11
24
 
12
25
  module ModuleThatIsReopened
13
26
  def module_that_is_reopened_method; end
14
27
  end
15
-
28
+
16
29
  describe "with an included module that is reopened" do
17
30
  it "should have repoened methods" do
18
31
  method(:module_that_is_reopened_method).should_not be_nil
@@ -67,19 +80,6 @@ module Spec
67
80
  end
68
81
  end
69
82
 
70
- class Thing
71
- attr_reader :arg
72
- def initialize(arg=nil)
73
- @arg = arg || :default
74
- end
75
- def ==(other)
76
- @arg == other.arg
77
- end
78
- def eql?(other)
79
- @arg == other.arg
80
- end
81
- end
82
-
83
83
  describe "#should" do
84
84
  before(:each) do
85
85
  @example_group = Class.new(ExampleGroupDouble)
@@ -88,19 +88,19 @@ module Spec
88
88
 
89
89
  context "in an ExampleGroup with an implicit subject" do
90
90
  it "delegates matcher to the implied subject" do
91
- @example_group.describe(Thing)
92
- @example_group.example { should == Thing.new(:default) }
93
- @example_group.example { should eql(Thing.new(:default)) }
91
+ @example_group.describe(::Thing)
92
+ @example_group.example { should == ::Thing.new(:default) }
93
+ @example_group.example { should eql(::Thing.new(:default)) }
94
94
  @example_group.run(@options).should be_true
95
95
  end
96
96
  end
97
97
 
98
98
  context "in an ExampleGroup using an explicit subject" do
99
99
  it "delegates matcher to the declared subject" do
100
- @example_group.describe(Thing)
101
- @example_group.subject { Thing.new(:other) }
102
- @example_group.example { should == Thing.new(:other) }
103
- @example_group.example { should eql(Thing.new(:other)) }
100
+ @example_group.describe(::Thing)
101
+ @example_group.subject { ::Thing.new(:other) }
102
+ @example_group.example { should == ::Thing.new(:other) }
103
+ @example_group.example { should eql(::Thing.new(:other)) }
104
104
  @example_group.run(@options).should be_true
105
105
  end
106
106
  end
@@ -113,19 +113,19 @@ module Spec
113
113
 
114
114
  context "in an ExampleGroup with an implicit subject" do
115
115
  it "delegates matcher to the implied subject" do
116
- @example_group.describe(Thing)
117
- @example_group.example { should_not == Thing.new(:other) }
118
- @example_group.example { should_not eql(Thing.new(:other)) }
116
+ @example_group.describe(::Thing)
117
+ @example_group.example { should_not == ::Thing.new(:other) }
118
+ @example_group.example { should_not eql(::Thing.new(:other)) }
119
119
  @example_group.run(::Spec::Runner::Options.new(StringIO.new, StringIO.new)).should be_true
120
120
  end
121
121
  end
122
122
 
123
123
  context "in an ExampleGroup using an explicit subject" do
124
124
  it "delegates matcher to the declared subject" do
125
- @example_group.describe(Thing)
126
- @example_group.subject { Thing.new(:other) }
127
- @example_group.example { should_not == Thing.new(:default) }
128
- @example_group.example { should_not eql(Thing.new(:default)) }
125
+ @example_group.describe(::Thing)
126
+ @example_group.subject { ::Thing.new(:other) }
127
+ @example_group.example { should_not == ::Thing.new(:default) }
128
+ @example_group.example { should_not eql(::Thing.new(:default)) }
129
129
  @example_group.run(::Spec::Runner::Options.new(StringIO.new, StringIO.new)).should be_true
130
130
  end
131
131
  end
@@ -42,7 +42,7 @@ module Spec
42
42
  raise
43
43
  end
44
44
  rescue => error
45
- error.pending_caller.should == "#{file}:#{line_number}"
45
+ error.pending_caller.should =~ /#{file}:#{line_number}/
46
46
  end
47
47
  end
48
48
 
@@ -130,12 +130,12 @@ module Spec
130
130
  end
131
131
 
132
132
  it "adds examples to current example_group using it_should_behave_like with a module" do
133
- AllThings = describe "all things", :shared => true do
133
+ ::AllThings = describe "all things", :shared => true do
134
134
  it "should do stuff" do end
135
135
  end
136
136
 
137
137
  example_group = describe "one thing" do
138
- it_should_behave_like AllThings
138
+ it_should_behave_like ::AllThings
139
139
  end
140
140
 
141
141
  example_group.number_of_examples.should == 1
@@ -128,19 +128,34 @@ module Spec
128
128
 
129
129
  it 'should keep public methods public' do
130
130
  @object.should_receive(:public_method)
131
- @object.public_methods.should include('public_method')
131
+ with_ruby('1.9') do
132
+ @object.public_methods.should include(:public_method)
133
+ end
134
+ with_ruby('1.8') do
135
+ @object.public_methods.should include('public_method')
136
+ end
132
137
  @object.public_method
133
138
  end
134
139
 
135
140
  it 'should keep private methods private' do
136
141
  @object.should_receive(:private_method)
137
- @object.private_methods.should include('private_method')
142
+ with_ruby('1.9') do
143
+ @object.private_methods.should include(:private_method)
144
+ end
145
+ with_ruby('1.8') do
146
+ @object.private_methods.should include('private_method')
147
+ end
138
148
  @object.public_method
139
149
  end
140
150
 
141
151
  it 'should keep protected methods protected' do
142
152
  @object.should_receive(:protected_method)
143
- @object.protected_methods.should include('protected_method')
153
+ with_ruby('1.9') do
154
+ @object.protected_methods.should include(:protected_method)
155
+ end
156
+ with_ruby('1.8') do
157
+ @object.protected_methods.should include('protected_method')
158
+ end
144
159
  @object.public_method
145
160
  end
146
161
 
@@ -5,7 +5,7 @@ describe "The bin/spec script" do
5
5
  include RubyForker
6
6
 
7
7
  it "should have no warnings" do
8
- pending "Hangs on JRuby" if PLATFORM =~ /java/
8
+ pending "Hangs on JRuby" if RUBY_PLATFORM =~ /java/
9
9
  spec_path = "#{File.dirname(__FILE__)}/../../../bin/spec"
10
10
 
11
11
  output = ruby "-w #{spec_path} --help 2>&1"
@@ -13,7 +13,7 @@ describe "The bin/spec script" do
13
13
  end
14
14
 
15
15
  it "should show the help w/ no args" do
16
- pending "Hangs on JRuby" if PLATFORM =~ /java/
16
+ pending "Hangs on JRuby" if RUBY_PLATFORM =~ /java/
17
17
  spec_path = "#{File.dirname(__FILE__)}/../../../bin/spec"
18
18
 
19
19
  output = ruby "-w #{spec_path} 2>&1"
@@ -20,7 +20,7 @@ module Spec
20
20
  class ::CommandLineForSpec
21
21
  def self.run(argv, stderr, stdout)
22
22
  orig_options = Spec::Runner.options
23
- tmp_options = OptionParser.parse(argv, stderr, stdout)
23
+ tmp_options = Spec::Runner::OptionParser.parse(argv, stderr, stdout)
24
24
  Spec::Runner.use tmp_options
25
25
  Spec::Runner::CommandLine.run(tmp_options)
26
26
  ensure
@@ -43,7 +43,7 @@ function makeYellow(element_id) {
43
43
  </script>
44
44
  <style type="text/css">
45
45
  #rspec-header {
46
- background: #65C400; color: #fff; height: 42px;
46
+ background: #65C400; color: #fff; height: 4em;
47
47
  }
48
48
 
49
49
  .rspec-report h1 {
@@ -51,7 +51,7 @@ function makeYellow(element_id) {
51
51
  padding: 10px;
52
52
  font-family: "Lucida Grande", Helvetica, sans-serif;
53
53
  font-size: 1.8em;
54
- float: left;
54
+ position: absolute;
55
55
  }
56
56
 
57
57
  #summary {
@@ -192,14 +192,15 @@ a {
192
192
  <div class="failure" id="failure_1">
193
193
  <div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
194
194
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=13">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:13</a> :in `block (2 levels) in <top (required)>'
195
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
196
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
197
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
198
- <pre class="ruby"><code><span class="linenum">11</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">should fail when expected message not received</span><span class="punct">&quot;</span> <span class="keyword">do</span>
199
- <span class="linenum">12</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">poke me</span><span class="punct">&quot;)</span>
200
- <span class="offending"><span class="linenum">13</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:poke</span><span class="punct">)</span></span>
201
- <span class="linenum">14</span> <span class="keyword">end</span>
202
- <span class="linenum">15</span> </code></pre>
195
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
196
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
197
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
198
+ <pre class="ruby"><code><span class="linenum">11</span> it "should fail when expected message not received" do
199
+ <span class="linenum">12</span> mock = mock("poke me")
200
+ <span class="offending"><span class="linenum">13</span> mock.should_receive(:poke)</span>
201
+ <span class="linenum">14</span> end
202
+ <span class="linenum">15</span>
203
+ <span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
203
204
  </div>
204
205
  </dd>
205
206
  <script type="text/javascript">moveProgressBar('17.6');</script>
@@ -208,14 +209,15 @@ a {
208
209
  <div class="failure" id="failure_2">
209
210
  <div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
210
211
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=22">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:22</a> :in `block (2 levels) in <top (required)>'
211
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
212
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
213
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
214
- <pre class="ruby"><code><span class="linenum">20</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:three</span><span class="punct">).</span><span class="ident">ordered</span>
215
- <span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
216
- <span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
217
- <span class="linenum">23</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">two</span>
218
- <span class="linenum">24</span> <span class="keyword">end</span></code></pre>
212
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
213
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
214
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
215
+ <pre class="ruby"><code><span class="linenum">20</span> mock.should_receive(:three).ordered
216
+ <span class="linenum">21</span> mock.one
217
+ <span class="offending"><span class="linenum">22</span> mock.three</span>
218
+ <span class="linenum">23</span> mock.two
219
+ <span class="linenum">24</span> end
220
+ <span class="linenum">25</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
219
221
  </div>
220
222
  </dd>
221
223
  <script type="text/javascript">moveProgressBar('23.5');</script>
@@ -224,13 +226,15 @@ a {
224
226
  <div class="failure" id="failure_3">
225
227
  <div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (no args) 0 times, but received it once</pre></div>
226
228
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=29">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:29</a> :in `block (2 levels) in <top (required)>'
227
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
228
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
229
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
230
- <pre class="ruby"><code><span class="linenum">27</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">don't talk to me</span><span class="punct">&quot;)</span>
231
- <span class="linenum">28</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_not_receive</span><span class="punct">(</span><span class="symbol">:any_message_at_all</span><span class="punct">)</span>
232
- <span class="offending"><span class="linenum">29</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">any_message_at_all</span></span>
233
- <span class="linenum">30</span> <span class="keyword">end</span></code></pre>
229
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
230
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
231
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
232
+ <pre class="ruby"><code><span class="linenum">27</span> mock = mock("don't talk to me")
233
+ <span class="linenum">28</span> mock.should_not_receive(:any_message_at_all)
234
+ <span class="offending"><span class="linenum">29</span> mock.any_message_at_all</span>
235
+ <span class="linenum">30</span> end
236
+ <span class="linenum">31</span>
237
+ <span class="linenum">32</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
234
238
  </div>
235
239
  </dd>
236
240
  <script type="text/javascript">moveProgressBar('29.4');</script>
@@ -239,14 +243,15 @@ a {
239
243
  <div class="failure" id="failure_4">
240
244
  <div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
241
245
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=33">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:33</a> :in `block (2 levels) in <top (required)>'
242
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
243
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
244
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
246
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
247
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
248
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
245
249
  <pre class="ruby"><code><span class="linenum">31</span>
246
- <span class="linenum">32</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">has a bug we need to fix</span><span class="punct">&quot;</span> <span class="keyword">do</span>
247
- <span class="offending"><span class="linenum">33</span> <span class="ident">pending</span> <span class="punct">&quot;</span><span class="string">here is the bug</span><span class="punct">&quot;</span> <span class="keyword">do</span></span>
248
- <span class="linenum">34</span> <span class="comment"># Actually, no. It's fixed. This will fail because it passes :-)</span>
249
- <span class="linenum">35</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">Bug</span><span class="punct">&quot;)</span></code></pre>
250
+ <span class="linenum">32</span> it "has a bug we need to fix" do
251
+ <span class="offending"><span class="linenum">33</span> pending "here is the bug" do</span>
252
+ <span class="linenum">34</span> # Actually, no. It's fixed. This will fail because it passes :-)
253
+ <span class="linenum">35</span> mock = mock("Bug")
254
+ <span class="linenum">36</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
250
255
  </div>
251
256
  </dd>
252
257
  </dl>
@@ -269,13 +274,15 @@ Diff:
269
274
  framework for Ruby
270
275
  </pre></div>
271
276
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=13">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb:13</a> :in `block (2 levels) in <top (required)>'
272
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
273
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
274
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
275
- <pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
276
- <span class="linenum">12</span><span class="constant">EOF</span>
277
- <span class="offending"><span class="linenum">13</span> <span class="ident">usa</span><span class="punct">.</span><span class="ident">should</span> <span class="punct">==</span> <span class="ident">uk</span></span>
278
- <span class="linenum">14</span> <span class="keyword">end</span></code></pre>
277
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
278
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
279
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
280
+ <pre class="ruby"><code><span class="linenum">11</span>framework for Ruby
281
+ <span class="linenum">12</span>EOF
282
+ <span class="offending"><span class="linenum">13</span> usa.should == uk</span>
283
+ <span class="linenum">14</span> end
284
+ <span class="linenum">15</span>
285
+ <span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
279
286
  </div>
280
287
  </dd>
281
288
  <script type="text/javascript">moveProgressBar('41.1');</script>
@@ -300,14 +307,15 @@ Diff:
300
307
  &gt;
301
308
  </pre></div>
302
309
  <div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=34">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb:34</a> :in `block (2 levels) in <top (required)>'
303
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:51</a> :in `block (4 levels) in <module:Formatter>'
304
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `chdir'
305
- <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/spec_mate_formatter_spec.rb:47</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
306
- <pre class="ruby"><code><span class="linenum">32</span> <span class="ident">expected</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">giraffe</span><span class="punct">&quot;</span>
307
- <span class="linenum">33</span> <span class="ident">actual</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">tortoise</span><span class="punct">&quot;</span>
308
- <span class="offending"><span class="linenum">34</span> <span class="ident">expected</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eql</span><span class="punct">(</span><span class="ident">actual</span><span class="punct">)</span></span>
309
- <span class="linenum">35</span> <span class="keyword">end</span>
310
- <span class="linenum">36</span><span class="keyword">end</span></code></pre>
310
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=49">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:49</a> :in `block (4 levels) in <module:Formatter>'
311
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `chdir'
312
+ <a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=45">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:45</a> :in `block (3 levels) in <module:Formatter>'</pre></div>
313
+ <pre class="ruby"><code><span class="linenum">32</span> expected = Animal.new "bob", "giraffe"
314
+ <span class="linenum">33</span> actual = Animal.new "bob", "tortoise"
315
+ <span class="offending"><span class="linenum">34</span> expected.should eql(actual)</span>
316
+ <span class="linenum">35</span> end
317
+ <span class="linenum">36</span>end
318
+ <span class="linenum">37</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
311
319
  </div>
312
320
  </dd>
313
321
  </dl>
@@ -62,7 +62,7 @@ module Spec
62
62
  it "should produce HTML identical to the one we designed manually with --diff" do
63
63
  produces_html_identical_to_manually_designed_document("--diff") do |html|
64
64
  suffix = jruby? ? '-jruby' : ''
65
- expected_file = File.dirname(__FILE__) + "/text_mate_formatted-#{::VERSION}#{suffix}.html"
65
+ expected_file = File.dirname(__FILE__) + "/text_mate_formatted-#{::RUBY_VERSION}#{suffix}.html"
66
66
  unless File.file?(expected_file)
67
67
  raise "There is no HTML file with expected content for this platform: #{expected_file}"
68
68
  end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Custom
2
3
  class ExampleUTF8ClassNameVarietà
3
4
  def self.è
data/spec/spec_helper.rb CHANGED
@@ -44,7 +44,7 @@ module Spec
44
44
  end
45
45
 
46
46
  def with_ruby(version)
47
- yield if RUBY_PLATFORM =~ Regexp.compile("^#{version}")
47
+ yield if RUBY_VERSION =~ Regexp.compile("^#{version.to_s}")
48
48
  end
49
49
  end
50
50
  end
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.99.5
4
+ version: 1.1.99.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RSpec Development Team
@@ -9,10 +9,29 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-12 00:00:00 -08:00
12
+ date: 2009-02-15 00:00:00 -08:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: cucumber
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.1.13
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.8.3
34
+ version:
16
35
  description: Behaviour Driven Development for Ruby.
17
36
  email:
18
37
  - rspec-devel@rubyforge.org
@@ -39,6 +58,7 @@ files:
39
58
  - Manifest.txt
40
59
  - README.txt
41
60
  - Rakefile
61
+ - Ruby1.9.markdown
42
62
  - TODO.txt
43
63
  - bin/autospec
44
64
  - bin/spec
@@ -392,6 +412,6 @@ rubyforge_project: rspec
392
412
  rubygems_version: 1.2.0
393
413
  signing_key:
394
414
  specification_version: 2
395
- summary: rspec 1.1.99.5
415
+ summary: rspec 1.1.99.6
396
416
  test_files: []
397
417