Skip to content

Commit

Permalink
removing flakly reg-ex assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricky committed Jul 20, 2019
1 parent 31db0ab commit 469f007
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/java/com/github/javafaker/CountryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.javafaker.repeating.Repeat;
import org.junit.Test;

import static com.github.javafaker.matchers.IsStringWithContents.isStringWithContents;
import static com.github.javafaker.matchers.MatchesRegularExpression.matchesRegularExpression;
import static org.junit.Assert.assertThat;

Expand Down Expand Up @@ -43,6 +44,6 @@ public void testCurrencyCode() {

@Test
public void testName() {
assertThat(faker.country().name(), matchesRegularExpression("([\\w-]+ ?)+"));
assertThat(faker.country().name(), isStringWithContents());
}
}

0 comments on commit 469f007

Please sign in to comment.