Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created May 16, 2010 11:41
Show Gist options
  • Select an option

  • Save reactormonk/402836 to your computer and use it in GitHub Desktop.

Select an option

Save reactormonk/402836 to your computer and use it in GitHub Desktop.
suite "Expert II - Shared verifies" do
shared do
verify "is a numeric" do
kind_of Numeric
end
end
shared do
exercise "mod 2" do
@number % 2
end
verify "is 0" do
returns 0
end
end
suite "division" do
setup.tabular_data <<-DATA
@number @result
24 8
32 10
DATA
exercise "int division by 3" do
@number / 3
end
verify "is @result" do
returns @result
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment