[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
+    }
+
 }