Skip to content

Commit

Permalink
updated versions
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed May 6, 2013
1 parent b6678f9 commit 21e8de9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<artifactId>thucydides</artifactId>
<groupId>net.thucydides</groupId>
<version>0.9.120</version>
<version>0.9.125</version>
</parent>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-jbehave-plugin</artifactId>
<version>0.9.123-SNAPSHOT</version>
<version>0.9.125-SNAPSHOT</version>
<name>thucydides-jbehave-plugin</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-core</artifactId>
<version>0.9.120</version>
<version>0.9.125</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>net.thucydides</groupId>
<artifactId>thucydides-sample-alternative-resources</artifactId>
<version>0.9.103</version>
<version>0.9.125</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/net/thucydides/jbehave/ThucydidesReporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ private Converter<String, TestTag> toTags() {
return new Converter<String, TestTag>() {
public TestTag convert(String tag) {
List<String> tagParts = Lists.newArrayList(Splitter.on(":").trimResults().split(tag));
return TestTag.withName(tagParts.get(1)).andType(tagParts.get(0));
if (tagParts.size() == 2) {
return TestTag.withName(tagParts.get(1)).andType(tagParts.get(0));
} else {
return TestTag.withName("true").andType(tagParts.get(0));
}
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,20 @@ public void a_test_should_have_tags_defined_by_the_tag_meta_field() throws Throw
assertThat(outcomes.get(0), havingTag(TestTag.withName("a domain").andType("domain")));
}

@Test
public void a_test_should_accept_boolean_tags() throws Throwable {

// Given
ThucydidesJUnitStories story = newStory("aBehaviorWithTags.story");

// When
run(story);

// Then
List<TestOutcome> outcomes = loadTestOutcomes();
assertThat(outcomes.get(0), havingTag(TestTag.withName("true").andType("security")));
}

@Test
public void a_test_should_have_storywide_tags_defined_by_the_tag_meta_field() throws Throwable {

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/stories/aBehaviorWithTags.story
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Meta:

Scenario: A scenario that works
Meta:
@tags domain:a domain, iteration: iteration 1
@tags domain:a domain, iteration: iteration 1, security

Given I have an implemented JBehave scenario
And the scenario works
Expand Down

0 comments on commit 21e8de9

Please sign in to comment.