Created
May 25, 2009 20:46
-
-
Save mtrudel/117743 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.dirname(__FILE__) + '/stories/stories_helper' | |
def build_time(days_ago, hour = 0, minute = 0, second = 0) | |
return days_ago.to_i.days.ago.change({:hour => hour.to_i, :min => minute.to_i, :sec => second.to_i}) | |
end | |
context "Person took readings more than 30 days ago, and only now got around to sending them" do | |
before(:all) do | |
@user = new_user | |
@user.clears_blackberry | |
@user.takes_a_blood_pressure_reading_of(build_time(35, 8), 129, 87, 86, 60, 'breakfast', 'before') | |
# @user.takes_a_weight_reading_of(build_time(35, 8), 129, 'kg', 'breakfast', 'before') | |
# @user.takes_a_glucose_reading_of(build_time(35, 8), 12.1, 'breakfast', 'before', false) | |
@user.waits_for_readings_to_be_sent | |
end | |
it 'should have a sensible report string' do | |
# @user.has_report_string_which | |
# @user.has_report_string_which.grep(Regexp.new('Insufficient data to calculate an average\.\s+Please continue to take readings\.')).should have_at_least(1).items | |
end | |
# it 'should have a sensible summary string' do | |
# @user.has_summary_string_which.grep(Regexp.new('Insufficient data to calculate an average\.\s+Please continue to take readings\.')).should have_at_least(1).items | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment