r77191 - in /trunk/libtest-spec-perl: Changes MANIFEST META.yml debian/changelog debian/patches/ lib/Test/Spec.pm lib/Test/Spec/Mocks.pm t/show_exceptions.t t/show_exeptions.t

ghedo-guest at users.alioth.debian.org ghedo-guest at users.alioth.debian.org
Thu Jul 7 16:28:33 UTC 2011


Author: ghedo-guest
Date: Thu Jul  7 16:28:22 2011
New Revision: 77191

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77191
Log:
* New upstream release
* Drop fix-pod-error patch (merged upstream)

Added:
    trunk/libtest-spec-perl/t/show_exceptions.t
      - copied unchanged from r77190, branches/upstream/libtest-spec-perl/current/t/show_exceptions.t
Removed:
    trunk/libtest-spec-perl/debian/patches/
    trunk/libtest-spec-perl/t/show_exeptions.t
Modified:
    trunk/libtest-spec-perl/Changes
    trunk/libtest-spec-perl/MANIFEST
    trunk/libtest-spec-perl/META.yml
    trunk/libtest-spec-perl/debian/changelog
    trunk/libtest-spec-perl/lib/Test/Spec.pm
    trunk/libtest-spec-perl/lib/Test/Spec/Mocks.pm

Modified: trunk/libtest-spec-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/Changes?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/Changes (original)
+++ trunk/libtest-spec-perl/Changes Thu Jul  7 16:28:22 2011
@@ -1,4 +1,8 @@
 Revision history for Perl extension Test::Spec.
+
+0.36 Tue Jul 05 18:23:00 EST 2011
+  - Improved reporting of errors using spec_helper.
+  - Minor documentation formatting fixes
 
 0.35 Wed Jun 29 16:52:00 UTC 2011
   - Fixed test suite for Windows environments.

Modified: trunk/libtest-spec-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/MANIFEST?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/MANIFEST (original)
+++ trunk/libtest-spec-perl/MANIFEST Thu Jul  7 16:28:22 2011
@@ -17,7 +17,7 @@
 t/perl_warning_spec.pl
 t/shared_examples.t
 t/shared_examples_spec.pl
-t/show_exeptions.t
+t/show_exceptions.t
 t/spec_helper.t
 t/strict_violating_spec.pl
 t/test_helper.pl

Modified: trunk/libtest-spec-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/META.yml?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/META.yml (original)
+++ trunk/libtest-spec-perl/META.yml Thu Jul  7 16:28:22 2011
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Test-Spec
-version:            0.35
+version:            0.36
 abstract:           Write tests in a declarative specification style
 author:
     - Philip Garrett <philip.garrett at icainformatics.com>

Modified: trunk/libtest-spec-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/debian/changelog?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/debian/changelog (original)
+++ trunk/libtest-spec-perl/debian/changelog Thu Jul  7 16:28:22 2011
@@ -1,11 +1,9 @@
-libtest-spec-perl (0.35-1) UNRELEASED; urgency=low
-
-  IGNORE-VERSION: 0.35-1
-  Fix tests for Windows
+libtest-spec-perl (0.36-1) UNRELEASED; urgency=low
 
   * New upstream release
+  * Drop fix-pod-error patch (merged upstream)
 
- -- Alessandro Ghedini <al3xbio at gmail.com>  Thu, 30 Jun 2011 15:03:52 +0200
+ -- Alessandro Ghedini <al3xbio at gmail.com>  Thu, 07 Jul 2011 18:25:47 +0200
 
 libtest-spec-perl (0.34-1) unstable; urgency=low
 

Modified: trunk/libtest-spec-perl/lib/Test/Spec.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/lib/Test/Spec.pm?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/lib/Test/Spec.pm (original)
+++ trunk/libtest-spec-perl/lib/Test/Spec.pm Thu Jul  7 16:28:22 2011
@@ -3,7 +3,7 @@
 use warnings;
 use Test::Trap ();        # load as early as possible to override CORE::exit
 
-our $VERSION = '0.35';
+our $VERSION = '0.36';
 
 use base qw(Exporter);
 
@@ -323,10 +323,12 @@
   }
   my $sub = eval "package $callpkg;\n" . q[sub {
     my ($file,$origpath) = @_;
-    if (not defined(do $file)) {
-      my $err = $! || $@;
-      die "could not load spec_helper '$origpath': $err";
-    }
+    open(my $IN, "<", $file)
+      || die "could not open spec_helper '$origpath': $!";
+    defined(my $content = do { local $/; <$IN> })
+      || die "could not read spec_helper '$origpath': $!";
+    eval("# line 1 \"$origpath\"\n" . $content);
+    die "$@\n" if $@;
   }];
   $sub->($load_path,$filespec);
 }
@@ -662,7 +664,7 @@
 
 Defines a group of examples that can later be included in
 C<describe> blocks or other C<shared_examples_for> blocks. See
-L</Shared Example Groups>.
+L</Shared example groups>.
 
 Example group names are B<global>.
 

Modified: trunk/libtest-spec-perl/lib/Test/Spec/Mocks.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-spec-perl/lib/Test/Spec/Mocks.pm?rev=77191&op=diff
==============================================================================
--- trunk/libtest-spec-perl/lib/Test/Spec/Mocks.pm (original)
+++ trunk/libtest-spec-perl/lib/Test/Spec/Mocks.pm Thu Jul  7 16:28:22 2011
@@ -574,14 +574,14 @@
 =item * Stub object
 
 A stub object is an object created specifically to return canned responses for
-a specific set of methods. These are created with the L<stub|/stub> function.
+a specific set of methods. These are created with the L<stub|/stub()> function.
 
 =item * Mock object
 
 Mock objects are similar to stub objects, but are programmed with both
 prepared responses and expectations for how they will be called. If the
 expectations are not met, they raise an exception to indicate that the test
-failed. Mock objects are created with the L<mock|/mock> function.
+failed. Mock objects are created with the L<mock|/mock()> function.
 
 =item * Stubbed method
 
@@ -590,7 +590,7 @@
 or class's behavior. For example, you might want to override the C<do> method
 of a DBI handle so it doesn't make changes to your database, but still need
 the handle to respond as usual to the C<quote> method.  You'll stub
-methods using the L<stubs|/stubs> method.
+methods using the L<stubs|/"$thing-E<gt>stubs($method_name)"> method.
 
 =item * Mocked method
 
@@ -599,7 +599,7 @@
 will raise an exception if not met. For example, you can mock a C<save> method
 on an object to ensure it is called by the code you are testing, while
 preventing the data from actually being committed to disk in your test. Use
-the L<expects|/expects> method to create mock methods.
+the L<expects|/"$thing-E<gt>expects($method)"> method to create mock methods.
 
 =item * "stub", "mock"
 
@@ -680,7 +680,7 @@
   };
 
 If you want something more flexible than "exactly", you can choose from
-"at_least", "at_most", "any_number" and others. See L</Mock expectations>.
+"at_least", "at_most", "any_number" and others. See L</EXPECTATION ADJUSTMENT METHODS>.
 
 
 =head2 Stubbing methods
@@ -734,11 +734,11 @@
 
 =over 4
 
-=item stub();
-
-=item stub($method_name => $result, ...);
-
-=item stub($method_name => sub { $result }, ...);
+=item stub()
+
+=item stub($method_name => $result, ...)
+
+=item stub($method_name => sub { $result }, ...)
 
 =item stub({ $method_name => $result, ... })
 
@@ -789,7 +789,7 @@
 =item mock()
 
 Returns a new blank, anonymous mock object, suitable for mocking methods with
-L<expects()|/expects()>.
+L<expects()|/"$thing-E<gt>expects($method)">.
 
   my $rect = mock();
   $rect->expects('area')->returns(100);
@@ -890,6 +890,8 @@
 
 =head1 OTHER EXPECTATION METHODS
 
+=over 4
+
 =item verify
 
 Allows you to verify manually that the expectation was met. If the expectation
@@ -901,8 +903,6 @@
 If the expectation has not been met, returns a list of problem description
 strings. Otherwise, returns an empty list.
 
-=over 4
-
 =back
 
 =head1 SEE ALSO




More information about the Pkg-perl-cvs-commits mailing list