[from now] 2012/09/01 13:37:00

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
new file mode 100644
index 0000000..87979d1
--- /dev/null
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -0,0 +1,6 @@
+package tddbc
+
+class VendingMachine {
+
+    Integer total = 0
+}
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
new file mode 100644
index 0000000..8e9c1f0
--- /dev/null
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -0,0 +1,14 @@
+package tddbc
+
+import spock.lang.Specification
+
+class VendingMachineSpec extends Specification {
+
+    def "何もしないで総計を取得する"() {
+        setup:
+        def vendingMachine = new VendingMachine()
+        expect:
+        vendingMachine.total == 0
+    }
+
+}

[from now] 2012/09/01 13:47:36

diff --git a/.idea/.name b/.idea/.name
index 6e92651..9ba1ba3 100644
--- a/.idea/.name
+++ b/.idea/.name
@@ -1 +1 @@
-tddbc-yokohama-20
\ No newline at end of file
+tddbc-yokohama-2.0
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 6c07785..77ebbfd 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="GradleSettings">
-    <option name="gradleHome" value="/usr/local/Cellar/gradle/1.1/libexec" />
+    <option name="gradleHome" value="/usr/local/Cellar/gradle/1.0/libexec" />
     <option name="linkedProjectPath" value="$PROJECT_DIR$/build.gradle" />
   </component>
 </project>
diff --git a/.idea/libraries/groovy_all_1_8_6.xml b/.idea/libraries/groovy_all_1_8_6.xml
index d2ee03f..15af2d3 100644
--- a/.idea/libraries/groovy_all_1_8_6.xml
+++ b/.idea/libraries/groovy_all_1_8_6.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="groovy-all-1.8.6">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/jar/96a26bfa6e5aea2e3c46df44a19de93a2acd2366/groovy-all-1.8.6.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.codehaus.groovy/groovy-all/1.8.6/jar/96a26bfa6e5aea2e3c46df44a19de93a2acd2366/groovy-all-1.8.6.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/source/2ac423ad404db3e3d9053c626d4c15a84cd18b73/groovy-all-1.8.6-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.codehaus.groovy/groovy-all/1.8.6/source/2ac423ad404db3e3d9053c626d4c15a84cd18b73/groovy-all-1.8.6-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/hamcrest_core_1_2.xml b/.idea/libraries/hamcrest_core_1_2.xml
index 0effe47..2098d28 100644
--- a/.idea/libraries/hamcrest_core_1_2.xml
+++ b/.idea/libraries/hamcrest_core_1_2.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="hamcrest-core-1.2">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/jar/44d12ff84e43c7d0539131f75c92f2f88dba6549/hamcrest-core-1.2.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.hamcrest/hamcrest-core/1.2/jar/44d12ff84e43c7d0539131f75c92f2f88dba6549/hamcrest-core-1.2.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/source/e9be1c6a53b4d4e7564756e924a9fa8b1661ec6a/hamcrest-core-1.2-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.hamcrest/hamcrest-core/1.2/source/e9be1c6a53b4d4e7564756e924a9fa8b1661ec6a/hamcrest-core-1.2-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/junit_dep_4_9.xml b/.idea/libraries/junit_dep_4_9.xml
index b24541c..e653d7f 100644
--- a/.idea/libraries/junit_dep_4_9.xml
+++ b/.idea/libraries/junit_dep_4_9.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="junit-dep-4.9">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/jar/1013627e3993319870863a020034004717505815/junit-dep-4.9.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/junit/junit-dep/4.9/jar/1013627e3993319870863a020034004717505815/junit-dep-4.9.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/source/84b903feddab2bd58f5ab2fc0c5c636df42df74d/junit-dep-4.9-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/junit/junit-dep/4.9/source/84b903feddab2bd58f5ab2fc0c5c636df42df74d/junit-dep-4.9-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/spock_core_0_6_groovy_1_8.xml b/.idea/libraries/spock_core_0_6_groovy_1_8.xml
index 7c62d23..63e7149 100644
--- a/.idea/libraries/spock_core_0_6_groovy_1_8.xml
+++ b/.idea/libraries/spock_core_0_6_groovy_1_8.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="spock-core-0.6-groovy-1.8">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/jar/5c1bfb5058c3659ddc206052601704ccd30133a5/spock-core-0.6-groovy-1.8.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.spockframework/spock-core/0.6-groovy-1.8/jar/5c1bfb5058c3659ddc206052601704ccd30133a5/spock-core-0.6-groovy-1.8.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/source/e86c73c53149bbd8a260f7a486c4d9667be5b9d2/spock-core-0.6-groovy-1.8-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.spockframework/spock-core/0.6-groovy-1.8/source/e86c73c53149bbd8a260f7a486c4d9667be5b9d2/spock-core-0.6-groovy-1.8-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3dcbaf2..33f0a1a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,7 +3,6 @@
   <component name="EntryPointsManager">
     <entry_points version="2.0" />
   </component>
-  <component name="IdProvider" IDEtalkID="C1CF16851D8006F75E3F1E83A3198426" />
   <component name="ProjectInspectionProfilesVisibleTreeState">
     <entry key="Project Default">
       <profile-state>
@@ -23,14 +22,44 @@
   <component name="ProjectResources">
     <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/build/classes" />
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="mySSHConnectionTimeout" value="30000" />
+    <option name="mySSHReadTimeout" value="30000" />
+    <option name="LAST_MERGED_REVISION" />
+    <option name="MERGE_DRY_RUN" value="false" />
+    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+    <option name="DETECT_NESTED_COPIES" value="true" />
+    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+    <option name="FORCE_UPDATE" value="false" />
+    <option name="IGNORE_EXTERNALS" value="false" />
+    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
   </component>
-  <component name="WebServicesPlugin" addRequiredLibraries="true" />
   <component name="masterDetails">
     <states>
-      <state key="Copyright.UI">
+      <state key="GlobalLibrariesConfigurable.UI">
+        <settings>
+          <last-edited>groovy-2.0.0</last-edited>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
+      <state key="JdkListConfigurable.UI">
         <settings>
+          <last-edited>1.6</last-edited>
           <splitter-proportions>
             <option name="proportions">
               <list>
@@ -52,6 +81,17 @@
           </splitter-proportions>
         </settings>
       </state>
+      <state key="ProjectLibrariesConfigurable.UI">
+        <settings>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
     </states>
   </component>
 </project>
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 6227a1f..490a50d 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/tddbc-yokohama-20.iml" filepath="$PROJECT_DIR$/tddbc-yokohama-20.iml" />
+      <module fileurl="file://$PROJECT_DIR$/tddbc-yokohama-2.0.iml" filepath="$PROJECT_DIR$/tddbc-yokohama-2.0.iml" />
     </modules>
   </component>
 </project>
diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 87979d1..9b99b47 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -3,4 +3,8 @@ package tddbc
 class VendingMachine {

     Integer total = 0
+
+    def insert(Integer coin) {
+        total = coin
+    }
 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 8e9c1f0..de796b7 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -11,4 +11,13 @@ class VendingMachineSpec extends Specification {
         vendingMachine.total == 0
     }

+    def "10円を入れて総計を取得すると10円を取得できる" () {
+        setup:
+        def vendingMachine = new VendingMachine()
+        when:
+        vendingMachine.insert(10)
+        then:
+        vendingMachine.total == 10
+    }
+
 }

[from now] 2012/09/01 13:50:55

diff --git a/.gitignore b/.gitignore
index b081e31..0839b48 100755
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,5 @@ out/
 build/

 # IntelliJ IDEA
-.idea/workspace.xml
+.idea
+*.imi
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 33f0a1a..1b71df2 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,6 +3,7 @@
   <component name="EntryPointsManager">
     <entry_points version="2.0" />
   </component>
+  <component name="IdProvider" IDEtalkID="E728B2FB9526149D4684A18FEDDE9BAA" />
   <component name="ProjectInspectionProfilesVisibleTreeState">
     <entry key="Project Default">
       <profile-state>
@@ -43,6 +44,7 @@
     <option name="IGNORE_EXTERNALS" value="false" />
     <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
   </component>
+  <component name="WebServicesPlugin" addRequiredLibraries="true" />
   <component name="masterDetails">
     <states>
       <state key="GlobalLibrariesConfigurable.UI">

[from now] 2012/09/01 13:54:13

diff --git a/.idea/.name b/.idea/.name
index 9ba1ba3..6e92651 100644
--- a/.idea/.name
+++ b/.idea/.name
@@ -1 +1 @@
-tddbc-yokohama-2.0
\ No newline at end of file
+tddbc-yokohama-20
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 77ebbfd..6c07785 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="GradleSettings">
-    <option name="gradleHome" value="/usr/local/Cellar/gradle/1.0/libexec" />
+    <option name="gradleHome" value="/usr/local/Cellar/gradle/1.1/libexec" />
     <option name="linkedProjectPath" value="$PROJECT_DIR$/build.gradle" />
   </component>
 </project>
diff --git a/.idea/libraries/groovy_all_1_8_6.xml b/.idea/libraries/groovy_all_1_8_6.xml
index 15af2d3..d2ee03f 100644
--- a/.idea/libraries/groovy_all_1_8_6.xml
+++ b/.idea/libraries/groovy_all_1_8_6.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="groovy-all-1.8.6">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.codehaus.groovy/groovy-all/1.8.6/jar/96a26bfa6e5aea2e3c46df44a19de93a2acd2366/groovy-all-1.8.6.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/jar/96a26bfa6e5aea2e3c46df44a19de93a2acd2366/groovy-all-1.8.6.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.codehaus.groovy/groovy-all/1.8.6/source/2ac423ad404db3e3d9053c626d4c15a84cd18b73/groovy-all-1.8.6-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/source/2ac423ad404db3e3d9053c626d4c15a84cd18b73/groovy-all-1.8.6-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/hamcrest_core_1_2.xml b/.idea/libraries/hamcrest_core_1_2.xml
index 2098d28..0effe47 100644
--- a/.idea/libraries/hamcrest_core_1_2.xml
+++ b/.idea/libraries/hamcrest_core_1_2.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="hamcrest-core-1.2">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.hamcrest/hamcrest-core/1.2/jar/44d12ff84e43c7d0539131f75c92f2f88dba6549/hamcrest-core-1.2.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/jar/44d12ff84e43c7d0539131f75c92f2f88dba6549/hamcrest-core-1.2.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.hamcrest/hamcrest-core/1.2/source/e9be1c6a53b4d4e7564756e924a9fa8b1661ec6a/hamcrest-core-1.2-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/source/e9be1c6a53b4d4e7564756e924a9fa8b1661ec6a/hamcrest-core-1.2-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/junit_dep_4_9.xml b/.idea/libraries/junit_dep_4_9.xml
index e653d7f..b24541c 100644
--- a/.idea/libraries/junit_dep_4_9.xml
+++ b/.idea/libraries/junit_dep_4_9.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="junit-dep-4.9">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/junit/junit-dep/4.9/jar/1013627e3993319870863a020034004717505815/junit-dep-4.9.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/jar/1013627e3993319870863a020034004717505815/junit-dep-4.9.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/junit/junit-dep/4.9/source/84b903feddab2bd58f5ab2fc0c5c636df42df74d/junit-dep-4.9-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/source/84b903feddab2bd58f5ab2fc0c5c636df42df74d/junit-dep-4.9-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/libraries/spock_core_0_6_groovy_1_8.xml b/.idea/libraries/spock_core_0_6_groovy_1_8.xml
index 63e7149..7c62d23 100644
--- a/.idea/libraries/spock_core_0_6_groovy_1_8.xml
+++ b/.idea/libraries/spock_core_0_6_groovy_1_8.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="spock-core-0.6-groovy-1.8">
     <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.spockframework/spock-core/0.6-groovy-1.8/jar/5c1bfb5058c3659ddc206052601704ccd30133a5/spock-core-0.6-groovy-1.8.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/jar/5c1bfb5058c3659ddc206052601704ccd30133a5/spock-core-0.6-groovy-1.8.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-13/filestore/org.spockframework/spock-core/0.6-groovy-1.8/source/e86c73c53149bbd8a260f7a486c4d9667be5b9d2/spock-core-0.6-groovy-1.8-sources.jar!/" />
+      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/source/e86c73c53149bbd8a260f7a486c4d9667be5b9d2/spock-core-0.6-groovy-1.8-sources.jar!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 1b71df2..78b2660 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,9 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="DaemonCodeAnalyzer">
+    <disable_hints />
+  </component>
   <component name="EntryPointsManager">
     <entry_points version="2.0" />
   </component>
-  <component name="IdProvider" IDEtalkID="E728B2FB9526149D4684A18FEDDE9BAA" />
+  <component name="IdProvider" IDEtalkID="A62DED2FE89980EC6049D6B29199CE97" />
   <component name="ProjectInspectionProfilesVisibleTreeState">
     <entry key="Project Default">
       <profile-state>
@@ -20,12 +23,143 @@
       </profile-state>
     </entry>
   </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
   <component name="ProjectResources">
     <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
+  <component name="RunManager">
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
+      <module name="" />
+      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
+      <option name="PROGRAM_PARAMETERS" />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Make" enabled="true" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="ANNOTATION_TYPE" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="moduleWithDependencies" />
+      </option>
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
+      <option name="PROPERTIES_FILE" />
+      <envs />
+      <properties />
+      <listeners />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Make" enabled="true" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Make" enabled="true" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="" />
+      <envs />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Make" enabled="true" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="moduleWithDependencies" />
+      </option>
+      <envs />
+      <patterns />
+      <method>
+        <option name="AntTarget" enabled="false" />
+        <option name="Make" enabled="true" />
+        <option name="Maven.BeforeRunTask" enabled="false" />
+      </method>
+    </configuration>
+    <list size="0" />
+    <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
+      <Host>localhost</Host>
+      <Port>5050</Port>
+    </configuration>
+  </component>
   <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
     <option name="USER" value="" />
     <option name="PASSWORD" value="" />
@@ -41,27 +175,14 @@
     <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
     <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
     <option name="FORCE_UPDATE" value="false" />
-    <option name="IGNORE_EXTERNALS" value="false" />
+    <configuration useDefault="true">$USER_HOME$/.subversion_IDEA</configuration>
     <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
   </component>
   <component name="WebServicesPlugin" addRequiredLibraries="true" />
   <component name="masterDetails">
     <states>
-      <state key="GlobalLibrariesConfigurable.UI">
-        <settings>
-          <last-edited>groovy-2.0.0</last-edited>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="JdkListConfigurable.UI">
+      <state key="Copyright.UI">
         <settings>
-          <last-edited>1.6</last-edited>
           <splitter-proportions>
             <option name="proportions">
               <list>
@@ -83,17 +204,6 @@
           </splitter-proportions>
         </settings>
       </state>
-      <state key="ProjectLibrariesConfigurable.UI">
-        <settings>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
     </states>
   </component>
 </project>
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 490a50d..6227a1f 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,7 +2,7 @@
 <project version="4">
   <component name="ProjectModuleManager">
     <modules>
-      <module fileurl="file://$PROJECT_DIR$/tddbc-yokohama-2.0.iml" filepath="$PROJECT_DIR$/tddbc-yokohama-2.0.iml" />
+      <module fileurl="file://$PROJECT_DIR$/tddbc-yokohama-20.iml" filepath="$PROJECT_DIR$/tddbc-yokohama-20.iml" />
     </modules>
   </component>
 </project>
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index de796b7..444eb29 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -1,23 +1,36 @@
 package tddbc

 import spock.lang.Specification
+import spock.lang.Unroll

 class VendingMachineSpec extends Specification {

     def "何もしないで総計を取得する"() {
         setup:
         def vendingMachine = new VendingMachine()
+
         expect:
         vendingMachine.total == 0
     }

-    def "10円を入れて総計を取得すると10円を取得できる" () {
+    @Unroll
+    def "#coin円を入れて総計を取得すると#total円を取得できる"() {
         setup:
         def vendingMachine = new VendingMachine()
+
         when:
-        vendingMachine.insert(10)
+        vendingMachine.insert(coin)
+
         then:
-        vendingMachine.total == 10
+        vendingMachine.total == total
+
+        where:
+        coin | total
+        10   | 10
+        50   | 50
+        100  | 100
+        500  | 500
+        1000 | 1000
     }

 }
diff --git a/tddbc-yokohama-20.iml b/tddbc-yokohama-20.iml
index 7cb24d4..62b6670 100644
--- a/tddbc-yokohama-20.iml
+++ b/tddbc-yokohama-20.iml
@@ -15,9 +15,9 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" scope="TEST" name="junit-dep-4.9" level="project" />
+    <orderEntry type="library" scope="TEST" name="spock-core-0.6-groovy-1.8" level="project" />
     <orderEntry type="library" scope="TEST" name="hamcrest-core-1.2" level="project" />
     <orderEntry type="library" exported="" name="groovy-all-1.8.6" level="project" />
-    <orderEntry type="library" scope="TEST" name="spock-core-0.6-groovy-1.8" level="project" />
   </component>
 </module>

[from now] 2012/09/01 13:57:55

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 9b99b47..d4c4d36 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -5,6 +5,6 @@ class VendingMachine {
     Integer total = 0

     def insert(Integer coin) {
-        total = coin
+        total += coin
     }
 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 444eb29..fe7aad7 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -33,4 +33,23 @@ class VendingMachineSpec extends Specification {
         1000 | 1000
     }

+    @Unroll
+    def "#coin1円と#coin2を入れて総計を取得すると#total円を取得できる"() {
+        setup:
+        def vendingMachine = new VendingMachine()
+
+        when:
+        vendingMachine.insert(coin1)
+        vendingMachine.insert(coin2)
+
+        then:
+        vendingMachine.total == total
+
+        where:
+        coin1 | coin2 | total
+        10    | 10    | 20
+        10    | 50    | 60
+        50    | 100   | 150
+    }
+
 }

[from now] 2012/09/01 14:43:28

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index d4c4d36..d6e46ab 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -7,4 +7,8 @@ class VendingMachine {
     def insert(Integer coin) {
         total += coin
     }
+
+    def refund() {
+        0
+    }
 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index fe7aad7..299b937 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -52,4 +52,12 @@ class VendingMachineSpec extends Specification {
         50    | 100   | 150
     }

+    def "何もしないで払い戻しすると0円を取得できる"() {
+        setup:
+        def vendingMachine = new VendingMachine()
+
+        expect:
+        vendingMachine.refund() == 0
+    }
+
 }

[from now] 2012/09/01 14:47:46

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index d6e46ab..7641ba6 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -9,6 +9,6 @@ class VendingMachine {
     }

     def refund() {
-        0
+        total
     }
 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 299b937..b59366c 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -59,5 +59,24 @@ class VendingMachineSpec extends Specification {
         expect:
         vendingMachine.refund() == 0
     }
+    @Unroll
+    def "#coin円を入れて払い戻しをすると#change円を取得できる"() {
+        setup:
+        def vendingMachine = new VendingMachine()
+
+        when:
+        vendingMachine.insert(coin)
+
+        then:
+        vendingMachine.refund() == change
+
+        where:
+        coin | change
+        10   | 10
+        50   | 50
+        100  | 100
+        500  | 500
+        1000 | 1000
+    }

 }

[from now] 2012/09/01 14:49:17

diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 6e92651..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-tddbc-yokohama-20
\ No newline at end of file
diff --git a/.idea/ant.xml b/.idea/ant.xml
deleted file mode 100644
index 2581ca3..0000000
--- a/.idea/ant.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="AntConfiguration">
-    <defaultAnt bundledAnt="true" />
-  </component>
-</project>
-
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index 9178b38..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectCodeStyleSettingsManager">
-    <option name="PER_PROJECT_SETTINGS">
-      <value>
-        <XML>
-          <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
-        </XML>
-      </value>
-    </option>
-  </component>
-</project>
-
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index a1b41c5..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac" />
-    <resourceExtensions />
-    <wildcardResourcePatterns>
-      <entry name="?*.properties" />
-      <entry name="?*.xml" />
-      <entry name="?*.gif" />
-      <entry name="?*.png" />
-      <entry name="?*.jpeg" />
-      <entry name="?*.jpg" />
-      <entry name="?*.html" />
-      <entry name="?*.dtd" />
-      <entry name="?*.tld" />
-      <entry name="?*.ftl" />
-    </wildcardResourcePatterns>
-    <annotationProcessing enabled="false" useClasspath="true" />
-  </component>
-</project>
-
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
deleted file mode 100644
index 3572571..0000000
--- a/.idea/copyright/profiles_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<component name="CopyrightManager">
-  <settings default="">
-    <module2copyright />
-  </settings>
-</component>
\ No newline at end of file
diff --git a/.idea/dictionaries/hideki.xml b/.idea/dictionaries/hideki.xml
deleted file mode 100644
index 2511b37..0000000
--- a/.idea/dictionaries/hideki.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<component name="ProjectDictionaryState">
-  <dictionary name="hideki" />
-</component>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index e206d70..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
-</project>
-
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index 6c07785..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="GradleSettings">
-    <option name="gradleHome" value="/usr/local/Cellar/gradle/1.1/libexec" />
-    <option name="linkedProjectPath" value="$PROJECT_DIR$/build.gradle" />
-  </component>
-</project>
-
diff --git a/.idea/libraries/groovy_all_1_8_6.xml b/.idea/libraries/groovy_all_1_8_6.xml
deleted file mode 100644
index d2ee03f..0000000
--- a/.idea/libraries/groovy_all_1_8_6.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
-  <library name="groovy-all-1.8.6">
-    <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/jar/96a26bfa6e5aea2e3c46df44a19de93a2acd2366/groovy-all-1.8.6.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.codehaus.groovy/groovy-all/1.8.6/source/2ac423ad404db3e3d9053c626d4c15a84cd18b73/groovy-all-1.8.6-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/hamcrest_core_1_2.xml b/.idea/libraries/hamcrest_core_1_2.xml
deleted file mode 100644
index 0effe47..0000000
--- a/.idea/libraries/hamcrest_core_1_2.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
-  <library name="hamcrest-core-1.2">
-    <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/jar/44d12ff84e43c7d0539131f75c92f2f88dba6549/hamcrest-core-1.2.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.hamcrest/hamcrest-core/1.2/source/e9be1c6a53b4d4e7564756e924a9fa8b1661ec6a/hamcrest-core-1.2-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/junit_dep_4_9.xml b/.idea/libraries/junit_dep_4_9.xml
deleted file mode 100644
index b24541c..0000000
--- a/.idea/libraries/junit_dep_4_9.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
-  <library name="junit-dep-4.9">
-    <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/jar/1013627e3993319870863a020034004717505815/junit-dep-4.9.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/junit/junit-dep/4.9/source/84b903feddab2bd58f5ab2fc0c5c636df42df74d/junit-dep-4.9-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/libraries/spock_core_0_6_groovy_1_8.xml b/.idea/libraries/spock_core_0_6_groovy_1_8.xml
deleted file mode 100644
index 7c62d23..0000000
--- a/.idea/libraries/spock_core_0_6_groovy_1_8.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<component name="libraryTable">
-  <library name="spock-core-0.6-groovy-1.8">
-    <CLASSES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/jar/5c1bfb5058c3659ddc206052601704ccd30133a5/spock-core-0.6-groovy-1.8.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES>
-      <root url="jar://$USER_HOME$/.gradle/caches/artifacts-14/filestore/org.spockframework/spock-core/0.6-groovy-1.8/source/e86c73c53149bbd8a260f7a486c4d9667be5b9d2/spock-core-0.6-groovy-1.8-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 78b2660..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="DaemonCodeAnalyzer">
-    <disable_hints />
-  </component>
-  <component name="EntryPointsManager">
-    <entry_points version="2.0" />
-  </component>
-  <component name="IdProvider" IDEtalkID="A62DED2FE89980EC6049D6B29199CE97" />
-  <component name="ProjectInspectionProfilesVisibleTreeState">
-    <entry key="Project Default">
-      <profile-state>
-        <expanded-state>
-          <State>
-            <id />
-          </State>
-        </expanded-state>
-        <selected-state>
-          <State>
-            <id>Abstraction issues</id>
-          </State>
-        </selected-state>
-      </profile-state>
-    </entry>
-  </component>
-  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
-    <OptionsSetting value="true" id="Add" />
-    <OptionsSetting value="true" id="Remove" />
-    <OptionsSetting value="true" id="Checkout" />
-    <OptionsSetting value="true" id="Update" />
-    <OptionsSetting value="true" id="Status" />
-    <OptionsSetting value="true" id="Edit" />
-    <ConfirmationsSetting value="0" id="Add" />
-    <ConfirmationsSetting value="0" id="Remove" />
-  </component>
-  <component name="ProjectResources">
-    <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-  <component name="RunManager">
-    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
-      <module name="" />
-      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
-      <option name="PROGRAM_PARAMETERS" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <configuration default="true" type="Remote" factoryName="Remote">
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
-      <option name="SERVER_MODE" value="false" />
-      <option name="SHMEM_ADDRESS" value="javadebug" />
-      <option name="HOST" value="localhost" />
-      <option name="PORT" value="5005" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <configuration default="true" type="TestNG" factoryName="TestNG">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="SUITE_NAME" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="GROUP_NAME" />
-      <option name="TEST_OBJECT" value="CLASS" />
-      <option name="VM_PARAMETERS" value="-ea" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="OUTPUT_DIRECTORY" />
-      <option name="ANNOTATION_TYPE" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="moduleWithDependencies" />
-      </option>
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
-      <option name="PROPERTIES_FILE" />
-      <envs />
-      <properties />
-      <listeners />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <module name="" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="HTML_FILE_NAME" />
-      <option name="HTML_USED" value="false" />
-      <option name="WIDTH" value="400" />
-      <option name="HEIGHT" value="300" />
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
-      <option name="VM_PARAMETERS" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <configuration default="true" type="Application" factoryName="Application">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="" />
-      <envs />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <configuration default="true" type="JUnit" factoryName="JUnit">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="TEST_OBJECT" value="class" />
-      <option name="VM_PARAMETERS" value="-ea" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="moduleWithDependencies" />
-      </option>
-      <envs />
-      <patterns />
-      <method>
-        <option name="AntTarget" enabled="false" />
-        <option name="Make" enabled="true" />
-        <option name="Maven.BeforeRunTask" enabled="false" />
-      </method>
-    </configuration>
-    <list size="0" />
-    <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
-      <Host>localhost</Host>
-      <Port>5050</Port>
-    </configuration>
-  </component>
-  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
-    <option name="USER" value="" />
-    <option name="PASSWORD" value="" />
-    <option name="mySSHConnectionTimeout" value="30000" />
-    <option name="mySSHReadTimeout" value="30000" />
-    <option name="LAST_MERGED_REVISION" />
-    <option name="MERGE_DRY_RUN" value="false" />
-    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
-    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
-    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
-    <option name="DETECT_NESTED_COPIES" value="true" />
-    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
-    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
-    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
-    <option name="FORCE_UPDATE" value="false" />
-    <configuration useDefault="true">$USER_HOME$/.subversion_IDEA</configuration>
-    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
-  </component>
-  <component name="WebServicesPlugin" addRequiredLibraries="true" />
-  <component name="masterDetails">
-    <states>
-      <state key="Copyright.UI">
-        <settings>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="ProjectJDKs.UI">
-        <settings>
-          <last-edited>1.6</last-edited>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-    </states>
-  </component>
-</project>
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 6227a1f..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/tddbc-yokohama-20.iml" filepath="$PROJECT_DIR$/tddbc-yokohama-20.iml" />
-    </modules>
-  </component>
-</project>
-
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<component name="DependencyValidationManager">
-  <state>
-    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
-  </state>
-</component>
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Palette2">
-    <group name="Swing">
-      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
-      </item>
-      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
-        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
-        <initial-values>
-          <property name="text" value="Button" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="RadioButton" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="CheckBox" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="Label" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
-          <preferred-size width="-1" height="20" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
-      </item>
-    </group>
-  </component>
-</project>
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 9d32e50..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="" />
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>
-
diff --git a/tddbc-yokohama-20.iml b/tddbc-yokohama-20.iml
deleted file mode 100644
index 62b6670..0000000
--- a/tddbc-yokohama-20.iml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/groovy" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/groovy" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" scope="TEST" name="junit-dep-4.9" level="project" />
-    <orderEntry type="library" scope="TEST" name="spock-core-0.6-groovy-1.8" level="project" />
-    <orderEntry type="library" scope="TEST" name="hamcrest-core-1.2" level="project" />
-    <orderEntry type="library" exported="" name="groovy-all-1.8.6" level="project" />
-  </component>
-</module>
-

[from now] 2012/09/01 14:53:53

diff --git a/.gitignore b/.gitignore
index 0839b48..427eb00 100755
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,4 @@ build/

 # IntelliJ IDEA
 .idea
-*.imi
+*.iml
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index b59366c..3b869a7 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -34,7 +34,7 @@ class VendingMachineSpec extends Specification {
     }

     @Unroll
-    def "#coin1円と#coin2を入れて総計を取得すると#total円を取得できる"() {
+    def "#coin1円と#coin2円を入れて総計を取得すると#total円を取得できる"() {
         setup:
         def vendingMachine = new VendingMachine()

@@ -79,4 +79,23 @@ class VendingMachineSpec extends Specification {
         1000 | 1000
     }

+    @Unroll
+    def "#coin1円と#coin2円を入れて払い戻しすると#total円を取得できる"() {
+        setup:
+        def vendingMachine = new VendingMachine()
+
+        when:
+        vendingMachine.insert(coin1)
+        vendingMachine.insert(coin2)
+
+        then:
+        vendingMachine.refund() == change
+
+        where:
+        coin1 | coin2 | change
+        10    | 10    | 20
+        10    | 50    | 60
+        50    | 100   | 150
+    }
+
 }

[from now] 2012/09/01 14:56:40

diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 3b869a7..369bb26 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -5,19 +5,19 @@ import spock.lang.Unroll

 class VendingMachineSpec extends Specification {

-    def "何もしないで総計を取得する"() {
-        setup:
-        def vendingMachine = new VendingMachine()
+    VendingMachine vendingMachine
+
+    def setup() {
+        vendingMachine = new VendingMachine()
+    }

+    def "何もしないで総計を取得する"() {
         expect:
         vendingMachine.total == 0
     }

     @Unroll
     def "#coin円を入れて総計を取得すると#total円を取得できる"() {
-        setup:
-        def vendingMachine = new VendingMachine()
-
         when:
         vendingMachine.insert(coin)

@@ -35,9 +35,6 @@ class VendingMachineSpec extends Specification {

     @Unroll
     def "#coin1円と#coin2円を入れて総計を取得すると#total円を取得できる"() {
-        setup:
-        def vendingMachine = new VendingMachine()
-
         when:
         vendingMachine.insert(coin1)
         vendingMachine.insert(coin2)
@@ -53,17 +50,12 @@ class VendingMachineSpec extends Specification {
     }

     def "何もしないで払い戻しすると0円を取得できる"() {
-        setup:
-        def vendingMachine = new VendingMachine()
-
         expect:
         vendingMachine.refund() == 0
     }
+
     @Unroll
     def "#coin円を入れて払い戻しをすると#change円を取得できる"() {
-        setup:
-        def vendingMachine = new VendingMachine()
-
         when:
         vendingMachine.insert(coin)

@@ -81,9 +73,6 @@ class VendingMachineSpec extends Specification {

     @Unroll
     def "#coin1円と#coin2円を入れて払い戻しすると#total円を取得できる"() {
-        setup:
-        def vendingMachine = new VendingMachine()
-
         when:
         vendingMachine.insert(coin1)
         vendingMachine.insert(coin2)

[from now] 2012/09/01 15:02:13

diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 369bb26..cc8ad11 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -34,21 +34,24 @@ class VendingMachineSpec extends Specification {
     }

     @Unroll
-    def "#coin1円と#coin2円を入れて総計を取得すると#total円を取得できる"() {
+    def "硬貨#coinsを入れて総計を取得すると#total円となる"() {
         when:
-        vendingMachine.insert(coin1)
-        vendingMachine.insert(coin2)
+        coins.each { coin ->
+            vendingMachine.insert(coin)
+        }

         then:
         vendingMachine.total == total

         where:
-        coin1 | coin2 | total
-        10    | 10    | 20
-        10    | 50    | 60
-        50    | 100   | 150
+        coins                    | total
+        [10, 10]                 | 20
+        [10, 50, 100]            | 160
+        [10, 50, 100, 500]       | 660
+        [10, 50, 100, 500, 1000] | 1660
     }

+
     def "何もしないで払い戻しすると0円を取得できる"() {
         expect:
         vendingMachine.refund() == 0
@@ -72,19 +75,21 @@ class VendingMachineSpec extends Specification {
     }

     @Unroll
-    def "#coin1円と#coin2円を入れて払い戻しすると#total円を取得できる"() {
+    def "硬貨#coinsを入れて払い戻しすると#change円を取得できる"() {
         when:
-        vendingMachine.insert(coin1)
-        vendingMachine.insert(coin2)
+        coins.each { coin ->
+            vendingMachine.insert(coin)
+        }

         then:
         vendingMachine.refund() == change

         where:
-        coin1 | coin2 | change
-        10    | 10    | 20
-        10    | 50    | 60
-        50    | 100   | 150
+        coins                    | change
+        [10, 10]                 | 20
+        [10, 50, 100]            | 160
+        [10, 50, 100, 500]       | 660
+        [10, 50, 100, 500, 1000] | 1660
     }

 }
[from now] 2012/09/01 15:12:58

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 7641ba6..2885af6 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -9,6 +9,9 @@ class VendingMachine {
     }

     def refund() {
-        total
+        def refund = total
+        total = 0
+        refund
     }
+
 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index cc8ad11..6460ef5 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -92,4 +92,15 @@ class VendingMachineSpec extends Specification {
         [10, 50, 100, 500, 1000] | 1660
     }

+    def "10円を入れて払い戻しした後は総計が0円になる"() {
+        setup:
+        vendingMachine.insert(10)
+
+        when:
+        vendingMachine.refund()
+
+        then:
+        vendingMachine.total == 0
+    }
+
 }
[from now] 2012/09/01 15:30:55

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 2885af6..355cd07 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -3,9 +3,14 @@ package tddbc
 class VendingMachine {

     Integer total = 0
+    static final List ALLOW_MONEYS = [10, 50, 100, 500, 1000]

     def insert(Integer coin) {
-        total += coin
+        if (ALLOW_MONEYS.contains(coin)) {
+            total += coin
+            return 0
+        }
+        coin
     }

     def refund() {
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 6460ef5..e52bd98 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -19,7 +19,7 @@ class VendingMachineSpec extends Specification {
     @Unroll
     def "#coin円を入れて総計を取得すると#total円を取得できる"() {
         when:
-        vendingMachine.insert(coin)
+        assert vendingMachine.insert(coin) == 0

         then:
         vendingMachine.total == total
@@ -103,4 +103,11 @@ class VendingMachineSpec extends Specification {
         vendingMachine.total == 0
     }

+
+    def "１円が投入されたらそのまま釣り銭として返す"() {
+        expect:
+        vendingMachine.insert(1) == 1
+
+    }
+
 }
[from now] 2012/09/01 15:35:12

diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index e52bd98..9bd768d 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -104,10 +104,13 @@ class VendingMachineSpec extends Specification {
     }

-    def "１円が投入されたらそのまま釣り銭として返す"() {
+    @Unroll
+    def "#coin円を入れると釣り銭としてそのまま返す"() {
         expect:
-        vendingMachine.insert(1) == 1
+        vendingMachine.insert(coin)

+        where:
+        coin << [1, 5, 2000, 5000, 10000]
     }

 }
[from now] 2012/09/01 15:40:11

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 355cd07..c9b335f 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -1,10 +1,24 @@
 package tddbc

+/**
+ * 自動販売機です。
+ */
 class VendingMachine {

-    Integer total = 0
+    /** 許可するお金 */
     static final List ALLOW_MONEYS = [10, 50, 100, 500, 1000]

+    /** 合計金額 */
+    Integer total = 0
+
+    /**
+     * お金を投入します。
+     * <p>
+     * 許可されないお金が投入された場合はそのまま釣り銭として返します。
+     *
+     * @param coin お金
+     * @return 釣り銭
+     */
     def insert(Integer coin) {
         if (ALLOW_MONEYS.contains(coin)) {
             total += coin
@@ -13,6 +27,13 @@ class VendingMachine {
         coin
     }

+    /**
+     * 払い戻しをします。
+     * <p>
+     * 現在投入されている金額を返し、合計金額を0にします。
+     *
+     * @return 釣り銭
+     */
     def refund() {
         def refund = total
         total = 0
[from now] 2012/09/01 16:52:03

diff --git a/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy b/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy
new file mode 100644
index 0000000..e06bd95
--- /dev/null
+++ b/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy
@@ -0,0 +1,7 @@
+package tddbc
+
+class UnusableMoneyUsedException extends RuntimeException {
+
+    Integer insertedMoney
+
+}
diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index c9b335f..9ed7035 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -11,20 +11,24 @@ class VendingMachine {
     /** 合計金額 */
     Integer total = 0

+    /** 投入されたお金 */
+    List insertedMoney = []
+
     /**
      * お金を投入します。
      * <p>
      * 許可されないお金が投入された場合はそのまま釣り銭として返します。
      *
-     * @param coin お金
+     * @param money お金
      * @return 釣り銭
      */
-    def insert(Integer coin) {
-        if (ALLOW_MONEYS.contains(coin)) {
-            total += coin
-            return 0
+    void insert(Integer money) {
+        if (ALLOW_MONEYS.contains(money)) {
+            total += money
+            insertedMoney << money
+            return
         }
-        coin
+        throw new UnusableMoneyUsedException(insertedMoney: money)
     }

     /**
@@ -37,7 +41,7 @@ class VendingMachine {
     def refund() {
         def refund = total
         total = 0
-        refund
+        insertedMoney
     }

 }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index 9bd768d..b92e94e 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -17,34 +17,34 @@ class VendingMachineSpec extends Specification {
     }

     @Unroll
-    def "#coin円を入れて総計を取得すると#total円を取得できる"() {
+    def "#money円を入れて総計を取得すると#total円を取得できる"() {
         when:
-        assert vendingMachine.insert(coin) == 0
+        vendingMachine.insert(money)

         then:
         vendingMachine.total == total

         where:
-        coin | total
-        10   | 10
-        50   | 50
-        100  | 100
-        500  | 500
-        1000 | 1000
+        money | total
+        10    | 10
+        50    | 50
+        100   | 100
+        500   | 500
+        1000  | 1000
     }

     @Unroll
-    def "硬貨#coinsを入れて総計を取得すると#total円となる"() {
+    def "硬貨#moneyListを入れて総計を取得すると#total円となる"() {
         when:
-        coins.each { coin ->
-            vendingMachine.insert(coin)
+        moneyList.each { money ->
+            vendingMachine.insert(money)
         }

         then:
         vendingMachine.total == total

         where:
-        coins                    | total
+        moneyList                | total
         [10, 10]                 | 20
         [10, 50, 100]            | 160
         [10, 50, 100, 500]       | 660
@@ -52,44 +52,45 @@ class VendingMachineSpec extends Specification {
     }

-    def "何もしないで払い戻しすると0円を取得できる"() {
+    def "何もしないで払い戻しすると空の集合が取得できる"() {
         expect:
-        vendingMachine.refund() == 0
+        vendingMachine.refund() == []
     }

     @Unroll
-    def "#coin円を入れて払い戻しをすると#change円を取得できる"() {
+    def "#money円を入れて払い戻しをすると#changeを取得できる"() {
         when:
-        vendingMachine.insert(coin)
+        vendingMachine.insert(money)

         then:
         vendingMachine.refund() == change

         where:
-        coin | change
-        10   | 10
-        50   | 50
-        100  | 100
-        500  | 500
-        1000 | 1000
+        money | change
+        10    | [10]
+        50    | [50]
+        100   | [100]
+        500   | [500]
+        1000  | [1000]
     }

     @Unroll
-    def "硬貨#coinsを入れて払い戻しすると#change円を取得できる"() {
+    def "#moneyListを入れて払い戻しすると#changeを取得できる"() {
         when:
-        coins.each { coin ->
-            vendingMachine.insert(coin)
+        moneyList.each { money ->
+            vendingMachine.insert(money)
         }

         then:
         vendingMachine.refund() == change

         where:
-        coins                    | change
-        [10, 10]                 | 20
-        [10, 50, 100]            | 160
-        [10, 50, 100, 500]       | 660
-        [10, 50, 100, 500, 1000] | 1660
+        moneyList                | change
+        [10, 10]                 | [10, 10]
+        [50, 50]                 | [50, 50] // TODO 100円?
+        [10, 50, 100]            | [10, 50, 100]
+        [10, 50, 100, 500]       | [10, 50, 100, 500]
+        [10, 50, 100, 500, 1000] | [10, 50, 100, 500, 1000]
     }

     def "10円を入れて払い戻しした後は総計が0円になる"() {
@@ -103,14 +104,17 @@ class VendingMachineSpec extends Specification {
         vendingMachine.total == 0
     }

-
     @Unroll
-    def "#coin円を入れると釣り銭としてそのまま返す"() {
-        expect:
-        vendingMachine.insert(coin)
+    def "#money円を入れると釣り銭としてそのまま返す"() {
+        when:
+        vendingMachine.insert(money)
+
+        then:
+        def e = thrown(UnusableMoneyUsedException)
+        e.insertedMoney == money

         where:
-        coin << [1, 5, 2000, 5000, 10000]
+        money << [1, 5, 2000, 5000, 10000]
     }

 }
[from now] 2012/09/01 16:56:51

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 9ed7035..62e15a7 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -6,13 +6,14 @@ package tddbc
 class VendingMachine {

     /** 許可するお金 */
-    static final List ALLOW_MONEYS = [10, 50, 100, 500, 1000]
-
-    /** 合計金額 */
-    Integer total = 0
+    static final List ALLOW_MONEY_LIST = [10, 50, 100, 500, 1000]

     /** 投入されたお金 */
-    List insertedMoney = []
+    List insertedMoneyList = []
+
+    Integer getTotal() {
+        insertedMoneyList.sum() ?: 0
+    }

     /**
      * お金を投入します。
@@ -23,9 +24,8 @@ class VendingMachine {
      * @return 釣り銭
      */
     void insert(Integer money) {
-        if (ALLOW_MONEYS.contains(money)) {
-            total += money
-            insertedMoney << money
+        if (ALLOW_MONEY_LIST.contains(money)) {
+            insertedMoneyList << money
             return
         }
         throw new UnusableMoneyUsedException(insertedMoney: money)
@@ -39,9 +39,9 @@ class VendingMachine {
      * @return 釣り銭
      */
     def refund() {
-        def refund = total
-        total = 0
-        insertedMoney
+        def refundMoneyList = insertedMoneyList
+        insertedMoneyList = []
+        refundMoneyList
     }

 }
[from now] 2012/09/01 16:58:07

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 62e15a7..bef8d59 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -24,11 +24,10 @@ class VendingMachine {
      * @return 釣り銭
      */
     void insert(Integer money) {
-        if (ALLOW_MONEY_LIST.contains(money)) {
-            insertedMoneyList << money
-            return
+        if (!ALLOW_MONEY_LIST.contains(money)) {
+            throw new UnusableMoneyUsedException(insertedMoney: money)
         }
-        throw new UnusableMoneyUsedException(insertedMoney: money)
+        insertedMoneyList << money
     }

     /**
[from now] 2012/09/01 17:18:35

diff --git a/src/main/groovy/tddbc/UnsupportedMoneyInsertedException.groovy b/src/main/groovy/tddbc/UnsupportedMoneyInsertedException.groovy
new file mode 100644
index 0000000..f55921e
--- /dev/null
+++ b/src/main/groovy/tddbc/UnsupportedMoneyInsertedException.groovy
@@ -0,0 +1,11 @@
+package tddbc
+
+/**
+ * 想定外のお金が投入された時に発生する例外です。
+ * */
+class UnsupportedMoneyInsertedException extends RuntimeException {
+
+    /** 投入されたお金 */
+    Integer insertedMoney
+
+}
diff --git a/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy b/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy
deleted file mode 100644
index e06bd95..0000000
--- a/src/main/groovy/tddbc/UnusableMoneyUsedException.groovy
+++ /dev/null
@@ -1,7 +0,0 @@
-package tddbc
-
-class UnusableMoneyUsedException extends RuntimeException {
-
-    Integer insertedMoney
-
-}
diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index bef8d59..6349b41 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -8,9 +8,21 @@ class VendingMachine {
     /** 許可するお金 */
     static final List ALLOW_MONEY_LIST = [10, 50, 100, 500, 1000]

+    /** ジュースの初期状態 */
+    static final Juice DEFAULT = new Juice(name: 'コーラ', price: 120, stock: 5)
+
     /** 投入されたお金 */
     List insertedMoneyList = []

+    /** 格納されているジュース */
+    Juice storedJuice = DEFAULT
+
+
+    /**
+     * 投入金額の総計を取得します。
+     *
+     * @return 総計
+     */
     Integer getTotal() {
         insertedMoneyList.sum() ?: 0
     }
@@ -25,7 +37,7 @@ class VendingMachine {
      */
     void insert(Integer money) {
         if (!ALLOW_MONEY_LIST.contains(money)) {
-            throw new UnusableMoneyUsedException(insertedMoney: money)
+            throw new UnsupportedMoneyInsertedException(insertedMoney: money)
         }
         insertedMoneyList << money
     }
diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index b92e94e..a0f1467 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -110,11 +110,20 @@ class VendingMachineSpec extends Specification {
         vendingMachine.insert(money)

         then:
-        def e = thrown(UnusableMoneyUsedException)
+        def e = thrown(UnsupportedMoneyInsertedException)
         e.insertedMoney == money

         where:
         money << [1, 5, 2000, 5000, 10000]
     }

+    def "ジュースの情報を取得すると120円のコーラ5本だ"() {
+        when:
+        def actual = vendingMachine.storedJuice
+        then:
+        actual.name == 'コーラ'
+        actual.price == 120
+        actual.stock == 5
+    }
+
 }
[from now] 2012/09/01 17:23:45

diff --git a/src/test/groovy/tddbc/VendingMachineSpec.groovy b/src/test/groovy/tddbc/VendingMachineSpec.groovy
index a0f1467..b3d94b8 100644
--- a/src/test/groovy/tddbc/VendingMachineSpec.groovy
+++ b/src/test/groovy/tddbc/VendingMachineSpec.groovy
@@ -117,9 +117,10 @@ class VendingMachineSpec extends Specification {
         money << [1, 5, 2000, 5000, 10000]
     }

-    def "ジュースの情報を取得すると120円のコーラ5本だ"() {
+    def "初期状態でジュースの情報を取得すると120円のコーラ5本だ！"() {
         when:
         def actual = vendingMachine.storedJuice
+
         then:
         actual.name == 'コーラ'
         actual.price == 120
[from now] 2012/09/01 17:23:53

diff --git a/src/main/groovy/tddbc/Juice.groovy b/src/main/groovy/tddbc/Juice.groovy
new file mode 100644
index 0000000..93dc091
--- /dev/null
+++ b/src/main/groovy/tddbc/Juice.groovy
@@ -0,0 +1,17 @@
+package tddbc
+
+/**
+ * ジュースです。
+ */
+class Juice {
+
+    /** 名前 */
+    String name
+
+    /** 値段 */
+    Integer price
+
+    /** 在庫数 */
+    Integer stock
+
+}
[from now] 2012/09/01 17:35:43

diff --git a/src/main/groovy/tddbc/VendingMachine.groovy b/src/main/groovy/tddbc/VendingMachine.groovy
index 6349b41..64a8f31 100644
--- a/src/main/groovy/tddbc/VendingMachine.groovy
+++ b/src/main/groovy/tddbc/VendingMachine.groovy
@@ -23,7 +23,7 @@ class VendingMachine {
      *
      * @return 総計
      */
-    Integer getTotal() {
+    def getTotal() {
         insertedMoneyList.sum() ?: 0
     }
[from now] 2012/09/01 17:57:39

diff --git a/.gitignore b/.gitignore
index 427eb00..db6a985 100755
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@

 .settings/
 .gradle/
+.gradletasknamecache

 # build directory #
 out/