Skip to content
Browse files

Step cleanup

  • Loading branch information...
1 parent 41dc5b9 commit 8e833b6270778d0ab958d9a5e919eda05815d71e @joshuaclayton committed Aug 28, 2010
Showing with 6 additions and 6 deletions.
  1. +3 −3 features/sieve.feature
  2. +3 −3 features/step_definitions/sieve_steps.rb
View
6 features/sieve.feature
@@ -4,7 +4,7 @@ Feature: Sieve of Eratosthenes
I should be able to call a sieve on a numeric to find its primes
Scenario Outline: Find primes effectively
- When I run a sieve on <number>
+ When I calculate the sieve for <number>
Then I should have the primes <primes>
Examples:
| number | primes |
@@ -24,10 +24,10 @@ Feature: Sieve of Eratosthenes
| 110 | 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109 |
Scenario: Allocating memory for the sieve raises an exception if it fails
- When I run a sieve on 1000000000000000000
+ When I calculate the sieve for 1000000000000000000
Then a NoMemoryError should be raised
Scenario: Prime tables
When I load all the primes from "features/support/primes.txt"
- And I run a sieve on the last number
+ And I calculate the sieve for the last number
Then I should have all primes from "features/support/primes.txt"
View
6 features/step_definitions/sieve_steps.rb
@@ -1,4 +1,4 @@
-When /^I run a sieve on (\-?\d+)$/ do |number|
+When /^I calculate the sieve for (\-?\d+)$/ do |number|
begin
@result = number.to_i.sieve
rescue Exception => @sieve_exception
@@ -22,8 +22,8 @@
@primes.should_not be_empty
end
-When /^I run a sieve on the last number$/ do
- When %{I run a sieve on #{@primes.last}}
+When /^I calculate the sieve for the last number$/ do
+ When %{I calculate the sieve for #{@primes.last}}
end
Then /^I should have all primes from "([^"]*)"$/ do |path|

0 comments on commit 8e833b6

Please sign in to comment.
Something went wrong with that request. Please try again.