Browse files

Import ruby og java

  • Loading branch information...
0 parents commit 4c09e2918aef09d1031543612254732077f8b112 @aslakhellesoy committed Jan 7, 2010
2 .gitignore
@@ -0,0 +1,2 @@
+target
+.idea
6 Rakefile
@@ -0,0 +1,6 @@
+require 'rubygems'
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new
+
+task :default => :cucumber
20 cuke4duke-java-example.iml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.picocontainer:picocontainer:2.8.3" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: cuke4duke:cuke4duke:0.2.2" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.jruby:jruby-complete:1.4.0" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant:1.7.1" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.apache.ant:ant-launcher:1.7.1" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.7" level="project" />
+ </component>
+</module>
+
12 features/rangere_hender.feature
@@ -0,0 +1,12 @@
+# language: no
+#
+# Rangering: http://www.thepokerforum.com/pokerhands.htm
+#
+Egenskap: Rangere hender
+ For å kunne peke ut en vinner raskere på TV
+ skal TV verten bli fortalt hvilken hånd som er høyest
+
+ Scenario: Ett par slår høyeste kort
+ Gitt at "rød" har "2K 2H 3S 4K 6H"
+ Og at "gul" har "AH KK QS 7R 9S"
+ skal "rød" vinne
6 features/step_definitions/game_steps.rb
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+#require 'poker'
+
+Gitt /^at "([^\"]*)" har "([^\"]*)"$/ do |spiller, hånd|
+ pending # express the regexp above with the code you wish you had
+end
1 features/support/env.rb
@@ -0,0 +1 @@
+require 'cucumber/formatter/unicode'
103 pom.xml
@@ -0,0 +1,103 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>cuke4duke</groupId>
+ <artifactId>cuke4duke-java-example</artifactId>
+ <packaging>jar</packaging>
+ <version>0.2.2</version>
+ <name>Cuke4Duke Java Example</name>
+ <url>http://cukes.info/</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>codehaus</id>
+ <url>http://repository.codehaus.org</url>
+ </repository>
+ <repository>
+ <id>cukes</id>
+ <url>http://cukes.info/maven</url>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>cukes</id>
+ <url>http://cukes.info/maven</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ <version>2.8.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cuke4duke</groupId>
+ <artifactId>cuke4duke</artifactId>
+ <version>0.2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>cuke4duke</groupId>
+ <artifactId>cuke4duke-maven-plugin</artifactId>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory</jvmArg>
+ <jvmArg>-Dfile.encoding=UTF-8</jvmArg>
+ </jvmArgs>
+ <cucumberArgs>
+ <cucumberArg>--color</cucumberArg>
+ <cucumberArg>--require</cucumberArg>
+ <cucumberArg>${basedir}/target/test-classes</cucumberArg>
+ </cucumberArgs>
+ <gems>
+ <gem>install cuke4duke --version 0.2.2</gem>
+ </gems>
+ </configuration>
+ <executions>
+ <execution>
+ <id>run-features</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>cucumber</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
11 src/test/java/poker/GameSteps.java
@@ -0,0 +1,11 @@
+package poker;
+
+import cuke4duke.Given;
+import cuke4duke.Pending;
+
+public class GameSteps {
+ @Given("^at \"([^\"]*)\" har \"([^\"]*)\"$")
+ @Pending
+ public void gittAtSpillerHarHånd(String spiller, String hånd) {
+ }
+}

0 comments on commit 4c09e29

Please sign in to comment.