rspec 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +28 -3
- data/EXAMPLES.rd +2 -16
- data/README +5 -2
- data/Rakefile +8 -4
- data/bin/spec +1 -0
- data/examples/custom_formatter.rb +2 -1
- data/examples/helper_method_spec.rb +12 -0
- data/examples/{mocking_spec.rb → mocking_example.rb} +0 -0
- data/examples/{bdd_framework_spec.rb → predicate_example.rb} +0 -0
- data/examples/stubbing_example.rb +28 -0
- data/lib/spec.rb +2 -1
- data/lib/spec/expectations.rb +7 -0
- data/lib/spec/expectations/diff.rb +56 -0
- data/lib/spec/expectations/exceptions.rb +6 -0
- data/lib/spec/expectations/expectations.rb +19 -0
- data/lib/spec/expectations/have_helper.rb +41 -0
- data/lib/spec/expectations/helper.rb +4 -0
- data/lib/spec/expectations/should_base.rb +52 -0
- data/lib/spec/expectations/should_helper.rb +93 -0
- data/lib/spec/expectations/should_negator.rb +71 -0
- data/lib/spec/{api → expectations}/sugar.rb +8 -8
- data/lib/spec/mocks.rb +5 -0
- data/lib/spec/{api/mocks → mocks}/argument_expectation.rb +1 -1
- data/lib/spec/{api → mocks}/exceptions.rb +3 -5
- data/lib/spec/{api/mocks → mocks}/message_expectation.rb +15 -9
- data/lib/spec/{api/mocks → mocks}/mock.rb +44 -26
- data/lib/spec/{api/mocks → mocks}/order_group.rb +1 -1
- data/lib/spec/runner/backtrace_tweaker.rb +4 -1
- data/lib/spec/runner/execution_context.rb +13 -4
- data/lib/spec/runner/formatter/base_text_formatter.rb +26 -13
- data/lib/spec/runner/formatter/html_formatter.rb +1 -1
- data/lib/spec/runner/option_parser.rb +6 -2
- data/lib/spec/runner/specification.rb +2 -2
- data/lib/spec/test_to_spec/ruby2ruby.rb +1 -1
- data/lib/spec/version.rb +1 -1
- data/test/spec/expectations/arbitrary_operator_test.rb +55 -0
- data/test/spec/expectations/arbitrary_predicate_test.rb +163 -0
- data/test/spec/{api/helper → expectations}/containment_test.rb +2 -2
- data/test/spec/expectations/diff_test.rb +62 -0
- data/test/spec/{api/helper → expectations}/identity_test.rb +2 -2
- data/test/spec/{api/helper → expectations}/object_equality_test.rb +2 -2
- data/test/spec/{api/helper → expectations}/raising_test.rb +5 -5
- data/test/spec/{api/helper → expectations}/regex_matching_test.rb +6 -6
- data/test/spec/{api/helper → expectations}/should_have_test.rb +11 -2
- data/test/spec/{api/helper → expectations}/should_satisfy_test.rb +2 -4
- data/test/spec/{api → expectations}/sugar_test.rb +8 -8
- data/test/spec/expectations/supported_symbols_test.rb +33 -0
- data/test/spec/{api/helper → expectations}/throwing_test.rb +2 -2
- data/test/spec/{api/helper → expectations}/true_false_special_case_test.rb +2 -2
- data/test/spec/{api/helper → expectations}/typing_test.rb +2 -2
- data/test/spec/{api/mocks → mocks}/mock_arg_constraints_test.rb +4 -4
- data/test/spec/{api/mocks → mocks}/mock_counts_test.rb +2 -2
- data/test/spec/{api/mocks → mocks}/mock_ordering_test.rb +2 -2
- data/test/spec/{api/mocks → mocks}/mock_test.rb +22 -7
- data/test/spec/{api/mocks → mocks}/null_object_test.rb +8 -2
- data/test/spec/runner/backtrace_tweaker_test.rb +21 -19
- data/test/spec/runner/context_matching_test.rb +2 -2
- data/test/spec/runner/context_runner_test.rb +6 -6
- data/test/spec/runner/context_test.rb +1 -1
- data/test/spec/runner/execution_context_test.rb +22 -5
- data/test/spec/runner/formatter/failure_dump_test.rb +7 -7
- data/test/spec/runner/option_parser_test.rb +20 -0
- data/test/spec/runner/reporter_test.rb +3 -3
- data/test/spec/runner/specification_test.rb +3 -3
- data/test/spec/test_to_spec/sexp_transformer_assertion_test.rb +4 -4
- data/test/spec/test_to_spec/sexp_transformer_test.rb +1 -1
- data/test/spec/test_to_spec/testfiles/test_unit_api_test.rb +2 -2
- data/test/test_classes.rb +21 -1
- data/test/test_helper.rb +1 -1
- data/vendor/selenium/README.txt +23 -0
- data/vendor/selenium/find_rspecs_home_page.rb +23 -0
- data/vendor/selenium/rspec_selenium.rb +33 -0
- data/vendor/watir/README.txt +32 -0
- data/vendor/watir/find_rspecs_home_page.rb +21 -0
- data/vendor/watir/find_rspecs_home_page.txt +15 -0
- data/vendor/watir/rspec_watir.rb +45 -0
- metadata +52 -41
- data/examples/airport_spec.rb +0 -33
- data/examples/custom_method_spec.rb +0 -24
- data/examples/sugar_spec.rb +0 -14
- data/lib/spec/api.rb +0 -8
- data/lib/spec/api/expectations.rb +0 -17
- data/lib/spec/api/helper.rb +0 -4
- data/lib/spec/api/helper/diff.rb +0 -54
- data/lib/spec/api/helper/have_helper.rb +0 -40
- data/lib/spec/api/helper/should_base.rb +0 -31
- data/lib/spec/api/helper/should_helper.rb +0 -93
- data/lib/spec/api/helper/should_negator.rb +0 -72
- data/test/spec/api/helper/arbitrary_predicate_test.rb +0 -112
- data/test/spec/api/helper/diff_test.rb +0 -60
@@ -1,60 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../../test_helper'
|
2
|
-
|
3
|
-
module Spec
|
4
|
-
class DiffTest < Test::Unit::TestCase
|
5
|
-
def test_should_output_unified_diff_of_two_strings
|
6
|
-
expected = <<-EOF
|
7
|
-
foo
|
8
|
-
bar
|
9
|
-
zap
|
10
|
-
this
|
11
|
-
is
|
12
|
-
soo
|
13
|
-
very
|
14
|
-
very
|
15
|
-
equal
|
16
|
-
insert
|
17
|
-
a
|
18
|
-
line
|
19
|
-
EOF
|
20
|
-
|
21
|
-
actual = <<-EOF
|
22
|
-
foo
|
23
|
-
zap
|
24
|
-
bar
|
25
|
-
this
|
26
|
-
is
|
27
|
-
soo
|
28
|
-
very
|
29
|
-
very
|
30
|
-
equal
|
31
|
-
insert
|
32
|
-
a
|
33
|
-
another
|
34
|
-
line
|
35
|
-
EOF
|
36
|
-
|
37
|
-
expected_diff = <<-EOF
|
38
|
-
|
39
|
-
|
40
|
-
@@ -1,6 +1,6 @@
|
41
|
-
foo
|
42
|
-
-bar
|
43
|
-
zap
|
44
|
-
+bar
|
45
|
-
this
|
46
|
-
is
|
47
|
-
soo
|
48
|
-
@@ -9,5 +9,6 @@
|
49
|
-
equal
|
50
|
-
insert
|
51
|
-
a
|
52
|
-
+another
|
53
|
-
line
|
54
|
-
EOF
|
55
|
-
|
56
|
-
diff = ShouldBase.new.diff_as_string(expected, actual)
|
57
|
-
assert_equal expected_diff, diff
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|