Skip to content

Instantly share code, notes, and snippets.

@jbrains
Created October 6, 2009 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrains/203499 to your computer and use it in GitHub Desktop.
Save jbrains/203499 to your computer and use it in GitHub Desktop.
describe "/registration/new" do
context "when deciding whether to enable the submit button" do
it "should disable it when the user is under 13" do
# Code to set up the form elided
form.age = 12
form.buttons[:submit].should_not be_enabled
end
it "should enable it when the user is at least 13" do
# Code to set up the form elided
form.age = 13
form.buttons[:submit].should be_enabled
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment