Skip to content

Commit

Permalink
Updated to 1.2.4 and a few renames.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Schuchert committed Nov 16, 2015
1 parent 4b26f83 commit 1586b62
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 81 deletions.
49 changes: 0 additions & 49 deletions build.gradle

This file was deleted.

26 changes: 23 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,22 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
</repository>
</repositories>
<properties>
<cucumber-jvm-version>1.0.9</cucumber-jvm-version>
<cucumber-jvm-version>1.2.4</cucumber-jvm-version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>info.cukes</groupId>
Expand All @@ -37,8 +50,15 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<version>4.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber-jvm-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.rackspace.example.stack;
package com.shoe.example;

import java.util.Stack;

public class RackStack {
private Stack stack = new Stack();
public class Stack {
private java.util.Stack<Object> stack = new java.util.Stack<Object>();

public void push(Object o) {
stack.push(o);
Expand Down
10 changes: 0 additions & 10 deletions src/test/java/com/rackspace/example/stack/stackTest.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.rackspace.example.stack;
package com.shoe.example;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

import cucumber.annotation.en.Given;
import cucumber.annotation.en.Then;
import cucumber.annotation.en.When;

import static junit.framework.Assert.assertEquals;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;

public class StackStepDefs {

private RackStack myStack;
private Stack myStack;
private Object pushed;
private Object popped;

Expand All @@ -25,23 +24,22 @@ public void I_push_another_item_into_the_stack() {
}

@Given("^an empty stack$")
public void an_empty_stack() {
myStack = new RackStack();
public void an_empty_stack() throws Throwable {
myStack = new Stack();
}

@Then("^I get the same item back$")
public void I_get_the_same_item_back() {
assertEquals(pushed, popped);
assertThat(pushed, is(popped));
}

@Then("^the stack contains one item$")
public void the_stack_contains_one_item() {
assertEquals(1, myStack.size());
assertThat(myStack.size(), is(1));
}

@Then("^the stack contains two items$")
public void the_stack_contains_two_items() {
assertEquals(2, myStack.size());
assertThat(myStack.size(), is(2));
}

@When("^I push an item into the stack$")
Expand Down
12 changes: 12 additions & 0 deletions src/test/java/com/shoe/example/StackTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.shoe.example;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(
plugin = { "pretty", "html:target/cucumber"}
)
public class StackTest {
}
File renamed without changes.

0 comments on commit 1586b62

Please sign in to comment.