rspec 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +12 -0
- data/EXAMPLES.rd +1 -1
- data/Rakefile +1 -0
- data/examples/auto_spec_description_example.rb +1 -1
- data/examples/before_and_after_example.rb +1 -1
- data/examples/behave_as_example.rb +1 -1
- data/examples/dynamic_spec.rb +1 -1
- data/examples/file_accessor.rb +18 -18
- data/examples/file_accessor_spec.rb +38 -38
- data/examples/greeter_spec.rb +1 -1
- data/examples/helper_method_example.rb +1 -1
- data/examples/io_processor.rb +8 -8
- data/examples/io_processor_spec.rb +1 -1
- data/examples/legacy_spec.rb +1 -1
- data/examples/not_yet_implemented_spec.rb +1 -1
- data/examples/partial_mock_example.rb +1 -1
- data/examples/predicate_example.rb +1 -1
- data/examples/stack.rb +1 -1
- data/examples/stack_spec.rb +1 -1
- data/examples/stubbing_example.rb +1 -1
- data/examples/test_case_adapter_example.rb +1 -1
- data/lib/autotest/discover.rb +1 -1
- data/lib/autotest/rspec.rb +15 -16
- data/lib/spec.rb +1 -1
- data/lib/spec/dsl/behaviour.rb +1 -0
- data/lib/spec/dsl/configuration.rb +1 -1
- data/lib/spec/dsl/description.rb +1 -1
- data/lib/spec/expectations.rb +1 -1
- data/lib/spec/expectations/extensions/string_and_symbol.rb +1 -1
- data/lib/spec/extensions/object.rb +1 -1
- data/lib/spec/matchers.rb +1 -1
- data/lib/spec/matchers/be_close.rb +1 -1
- data/lib/spec/matchers/eql.rb +1 -1
- data/lib/spec/matchers/equal.rb +1 -1
- data/lib/spec/matchers/have.rb +7 -2
- data/lib/spec/mocks.rb +1 -1
- data/lib/spec/mocks/argument_constraint_matchers.rb +1 -1
- data/lib/spec/mocks/error_generator.rb +1 -1
- data/lib/spec/mocks/methods.rb +1 -1
- data/lib/spec/mocks/mock.rb +1 -1
- data/lib/spec/mocks/proxy.rb +1 -1
- data/lib/spec/mocks/space.rb +1 -1
- data/lib/spec/mocks/spec_methods.rb +1 -1
- data/lib/spec/rake/verify_rcov.rb +1 -1
- data/lib/spec/runner/backtrace_tweaker.rb +1 -1
- data/lib/spec/runner/behaviour_runner.rb +1 -1
- data/lib/spec/runner/command_line.rb +1 -1
- data/lib/spec/runner/drb_command_line.rb +1 -1
- data/lib/spec/runner/formatter/failing_behaviours_formatter.rb +1 -1
- data/lib/spec/runner/formatter/failing_examples_formatter.rb +1 -1
- data/lib/spec/runner/formatter/progress_bar_formatter.rb +1 -1
- data/lib/spec/runner/formatter/rdoc_formatter.rb +1 -1
- data/lib/spec/runner/formatter/snippet_extractor.rb +1 -1
- data/lib/spec/runner/heckle_runner_unsupported.rb +10 -10
- data/lib/spec/runner/spec_parser.rb +1 -1
- data/lib/spec/test_case_adapter.rb +1 -1
- data/lib/spec/translator.rb +106 -106
- data/lib/spec/version.rb +22 -22
- data/spec/spec/dsl/behaviour_factory_spec.rb +1 -1
- data/spec/spec/dsl/configuration_spec.rb +1 -1
- data/spec/spec/dsl/description_spec.rb +1 -1
- data/spec/spec/dsl/predicate_matcher_spec.rb +1 -1
- data/spec/spec/dsl/shared_behaviour_spec.rb +19 -6
- data/spec/spec/matchers/description_generation_spec.rb +1 -1
- data/spec/spec/matchers/exist_spec.rb +1 -1
- data/spec/spec/matchers/handler_spec.rb +1 -1
- data/spec/spec/matchers/have_spec.rb +14 -1
- data/spec/spec/matchers/mock_constraint_matchers_spec.rb +1 -1
- data/spec/spec/matchers/respond_to_spec.rb +1 -1
- data/spec/spec/mocks/any_number_of_times_spec.rb +1 -1
- data/spec/spec/mocks/at_least_spec.rb +1 -1
- data/spec/spec/mocks/at_most_spec.rb +1 -1
- data/spec/spec/mocks/bug_report_7611_spec.rb +1 -1
- data/spec/spec/mocks/bug_report_7805_spec.rb +1 -1
- data/spec/spec/mocks/bug_report_8165_spec.rb +1 -1
- data/spec/spec/mocks/bug_report_8302_spec.rb +1 -1
- data/spec/spec/mocks/mock_ordering_spec.rb +1 -1
- data/spec/spec/mocks/once_counts_spec.rb +1 -1
- data/spec/spec/mocks/partial_mock_spec.rb +1 -1
- data/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +1 -1
- data/spec/spec/mocks/precise_counts_spec.rb +1 -1
- data/spec/spec/mocks/record_messages_spec.rb +1 -1
- data/spec/spec/mocks/stub_spec.rb +1 -1
- data/spec/spec/mocks/twice_counts_spec.rb +1 -1
- data/spec/spec/package/bin_spec_spec.rb +1 -1
- data/spec/spec/runner/context_matching_spec.rb +1 -1
- data/spec/spec/runner/example_matcher_spec.rb +1 -1
- data/spec/spec/runner/formatter/failing_behaviours_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/html_formatter_spec.rb +0 -2
- data/spec/spec/runner/formatter/progress_bar_formatter_dry_run_spec.rb +1 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_failure_dump_spec.rb +1 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/rdoc_formatter_dry_run_spec.rb +1 -1
- data/spec/spec/runner/formatter/rdoc_formatter_spec.rb +1 -1
- data/spec/spec/runner/formatter/snippet_extractor_spec.rb +1 -1
- data/spec/spec/runner/formatter/specdoc_formatter_dry_run_spec.rb +1 -1
- data/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/spec/spec/runner/heckler_spec.rb +1 -1
- data/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +1 -1
- data/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +1 -1
- data/spec/spec/runner/reporter_spec.rb +1 -1
- data/spec/spec/runner/spec_parser_spec.rb +1 -1
- data/spec/spec/translator_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -29
- metadata +3 -4
- data/lib/autotest.rb +0 -1
@@ -47,6 +47,19 @@ describe "should have(n).items" do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
describe "should have(n).items where result responds to items but returns something other than a collection" do
|
51
|
+
it "should provide a meaningful error" do
|
52
|
+
owner = Class.new do
|
53
|
+
def items
|
54
|
+
Object.new
|
55
|
+
end
|
56
|
+
end.new
|
57
|
+
lambda do
|
58
|
+
owner.should have(3).items
|
59
|
+
end.should raise_error(RuntimeError, "expected items to be a collection but it does not respond to #length or #size")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
50
63
|
describe "should_not have(n).items" do
|
51
64
|
include HaveSpecHelper
|
52
65
|
|
@@ -256,4 +269,4 @@ describe "have(n).things on an object which is not a collection nor contains one
|
|
256
269
|
it "should fail" do
|
257
270
|
lambda { Object.new.should have(2).things }.should raise_error(NoMethodError, /undefined method `things' for #<Object:/)
|
258
271
|
end
|
259
|
-
end
|
272
|
+
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../../../spec_helper.rb'
|
2
2
|
|
3
3
|
describe "HtmlFormatter" do
|
4
|
-
it_should_behave_like "Examples that have to load files"
|
5
|
-
|
6
4
|
['--diff', '--dry-run'].each do |opt|
|
7
5
|
it "should produce HTML identical to the one we designed manually with #{opt}" do
|
8
6
|
root = File.expand_path(File.dirname(__FILE__) + '/../../../..')
|
data/spec/spec_helper.rb
CHANGED
@@ -41,32 +41,3 @@ module Spec
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
44
|
-
|
45
|
-
# There are some examples that need to load the same files repeatedly.
|
46
|
-
# Requiring spec files instead of loading them (see http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10814&group_id=797),
|
47
|
-
# caused these specs to fail.
|
48
|
-
#
|
49
|
-
# This shared behaviour solves that problem by redefining the behaviour of
|
50
|
-
# load_specs only for those examples.
|
51
|
-
unless defined?(RSPEC_EXAMPLES_THAT_LOAD_FILES)
|
52
|
-
RSPEC_EXAMPLES_THAT_LOAD_FILES = describe "Examples that have to load files", :shared => true do
|
53
|
-
before(:all) do
|
54
|
-
Spec::Runner::BehaviourRunner.class_eval do
|
55
|
-
alias_method :orig_load_specs, :load_specs
|
56
|
-
def load_specs(paths)
|
57
|
-
paths.each do |path|
|
58
|
-
load path
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
after(:all) do
|
65
|
-
Spec::Runner::BehaviourRunner.class_eval do
|
66
|
-
undef :load_specs
|
67
|
-
alias_method :load_specs, :orig_load_specs
|
68
|
-
undef :orig_load_specs
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
metadata
CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rspec
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-05
|
8
|
-
summary: RSpec-1.0.
|
6
|
+
version: 1.0.5
|
7
|
+
date: 2007-06-05 00:00:00 -05:00
|
8
|
+
summary: RSpec-1.0.5 (r2081) - BDD for Ruby http://rspec.rubyforge.org/
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: rspec-devel@rubyforge.org
|
@@ -37,7 +37,6 @@ files:
|
|
37
37
|
- UPGRADE
|
38
38
|
- lib/autotest/discover.rb
|
39
39
|
- lib/autotest/rspec.rb
|
40
|
-
- lib/autotest.rb
|
41
40
|
- lib/spec/dsl/behaviour.rb
|
42
41
|
- lib/spec/dsl/behaviour_callbacks.rb
|
43
42
|
- lib/spec/dsl/behaviour_eval.rb
|
data/lib/autotest.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + "/autotest/rspec"
|