You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/05/16 20:50:32 UTC
[33/44] git commit: Rename base class
Rename base class
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/26575633
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/26575633
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/26575633
Branch: refs/heads/master
Commit: 2657563333c1e0f7820483fd72f1aeb4e10bc192
Parents: 5c90778
Author: Howard M. Lewis Ship <hl...@gmail.com>
Authored: Thu Apr 19 17:04:04 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Wed May 16 11:49:41 2012 -0700
----------------------------------------------------------------------
.../ioc/AbstractRegistrySpecification.groovy | 28 +++++++++++++++
.../org/apache/tapestry/ioc/EagerLoadSpec.groovy | 2 +-
.../apache/tapestry/ioc/IOCSpecification.groovy | 28 ---------------
.../ioc/services/PeriodicExecutorSpec.groovy | 4 +-
4 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/26575633/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/AbstractRegistrySpecification.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/AbstractRegistrySpecification.groovy b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/AbstractRegistrySpecification.groovy
new file mode 100644
index 0000000..41f328b
--- /dev/null
+++ b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/AbstractRegistrySpecification.groovy
@@ -0,0 +1,28 @@
+package org.apache.tapestry.ioc
+
+import org.apache.tapestry5.ioc.Registry
+import org.apache.tapestry5.ioc.RegistryBuilder
+import spock.lang.AutoCleanup
+import spock.lang.Specification
+
+/**
+ * Base class for Spock specifications that use a new {@link Registry} for each feature method.
+ */
+abstract class AbstractRegistrySpecification extends Specification {
+
+ @AutoCleanup("shutdown")
+ protected Registry registry;
+
+ protected final void buildRegistry(Class... moduleClasses) {
+
+ registry =
+ new RegistryBuilder().add(moduleClasses).build()
+ }
+
+ /** Any unrecognized methods are evaluated against the registry. */
+ def methodMissing(String name, args) {
+ registry."$name"(* args)
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/26575633/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/EagerLoadSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/EagerLoadSpec.groovy b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/EagerLoadSpec.groovy
index 4ee948a..cd8338f 100644
--- a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/EagerLoadSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/EagerLoadSpec.groovy
@@ -3,7 +3,7 @@ package org.apache.tapestry.ioc
import org.apache.tapestry5.ioc.EagerProxyReloadModule
-class EagerLoadSpec extends IOCSpecification {
+class EagerLoadSpec extends AbstractRegistrySpecification {
def "proxied service does eager load"()
{
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/26575633/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/IOCSpecification.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/IOCSpecification.groovy b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/IOCSpecification.groovy
deleted file mode 100644
index 8340c43..0000000
--- a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/IOCSpecification.groovy
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.apache.tapestry.ioc
-
-import org.apache.tapestry5.ioc.Registry
-import org.apache.tapestry5.ioc.RegistryBuilder
-import spock.lang.AutoCleanup
-import spock.lang.Specification
-
-/**
- * Base class for Spock specifications that use an {@link Registry}.
- */
-abstract class IOCSpecification extends Specification {
-
- @AutoCleanup("shutdown")
- protected Registry registry;
-
- protected final void buildRegistry(Class... moduleClasses) {
-
- registry =
- new RegistryBuilder().add(moduleClasses).build()
- }
-
- /** Any unrecognized methods are evaluated against the registry. */
- def methodMissing(String name, args) {
- registry."$name"(* args)
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/26575633/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/services/PeriodicExecutorSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/services/PeriodicExecutorSpec.groovy b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/services/PeriodicExecutorSpec.groovy
index 0cfeff8..535e399 100644
--- a/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/services/PeriodicExecutorSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/org/apache/tapestry/ioc/services/PeriodicExecutorSpec.groovy
@@ -1,13 +1,13 @@
package org.apache.tapestry.ioc.services
-import org.apache.tapestry.ioc.IOCSpecification
+import org.apache.tapestry.ioc.AbstractRegistrySpecification
import org.apache.tapestry5.ioc.services.cron.IntervalSchedule
import org.apache.tapestry5.ioc.services.cron.PeriodicExecutor
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
-class PeriodicExecutorSpec extends IOCSpecification {
+class PeriodicExecutorSpec extends AbstractRegistrySpecification {
def "execution intervals"() {