Skip to content

Commit

Permalink
quick fix for a spec that assumes Time.now.hour is a two digit number…
Browse files Browse the repository at this point in the history
…, better fix is to use Timecop or similar
  • Loading branch information
justinfrench committed Jan 18, 2010
1 parent f59f898 commit e18b6c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/inputs/time_input_spec.rb
Expand Up @@ -79,7 +79,7 @@
concat(builder.input(:created_at, :as => :time))
end
output_buffer.should have_tag("form li ol li select#post_created_at_4i option[@selected]", :count => 1)
output_buffer.should have_tag("form li ol li select#post_created_at_4i option[@value='#{Time.now.hour}'][@selected]", :count => 1)
output_buffer.should have_tag("form li ol li select#post_created_at_4i option[@value='#{Time.now.hour.to_s.rjust(2,'0')}'][@selected]", :count => 1)
end
end

Expand Down

0 comments on commit e18b6c0

Please sign in to comment.