Permalink
Browse files

Test fix for negative number input

  • Loading branch information...
1 parent 06ef498 commit 355ae9a5fdd904b03393b75a49d781353e413a73 @mhoran committed Mar 29, 2013
Showing with 19 additions and 0 deletions.
  1. +7 −0 features/fill_in.feature
  2. +11 −0 features/step_definitions/fill_in_steps.rb
  3. +1 −0 public/test.html
View
@@ -0,0 +1,7 @@
+Feature: Testing fill_in
+
+ @javascript
+ Scenario:
+ Given I am on a page with a text input
+ When I fill in a negative value
+ Then a negative value should be returned
@@ -0,0 +1,11 @@
+Given "I am on a page with a text input" do
+ visit '/test.html'
+end
+
+When "I fill in a negative value" do
+ fill_in 'Number', with: '-2.5'
+end
+
+Then "a negative value should be returned" do
+ find_field('Number').value.should == '-2.5'
+end
View
@@ -15,6 +15,7 @@
<body>
<form>
<label>Input <input type="text" data-mask="9999" value="2012" /></label>
+ <label>Number <input type="number" /></label>
</form>
</body>
</html>

0 comments on commit 355ae9a

Please sign in to comment.