Skip to content

Commit

Permalink
Better names
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Jan 30, 2016
1 parent ea57ffc commit e87b86e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
8 changes: 8 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ html {
min-height: 100%;
}

body {
text-transform: lowercase;
}

.btn {
text-transform: lowercase;
}

.bg-high {
background-color: $warning-pink;
}
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@
@import url('//fonts.googleapis.com/css?family=NTR');

$font-family-sans-serif: NTR, sans-serif;

body {
text-transform: lowercase;
}
6 changes: 5 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@
# available at http://guides.rubyonrails.org/i18n.html.

en:
hello: "Hello world"
helpers:
submit:
create: "Add"
submit: "Save"
update: "Update"
10 changes: 5 additions & 5 deletions spec/requests/glucose_measurements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
expect {
fill_in 'Date and time', with: '2016-01-27 17:53:00'
fill_in 'Value', with: '5.6'
click_button 'Create'
click_button 'Add'
}.to change(GlucoseMeasurement, :count).by 1

within 'th' do
Expand All @@ -31,17 +31,17 @@
visit new_glucose_measurement_url(as: user)
fill_in 'Date and time', with: '2016-01-27 12:00:00'
fill_in 'Value', with: '5.6'
click_button 'Create'
click_button 'Add'

visit new_glucose_measurement_url(as: user)
fill_in 'Date and time', with: '2016-01-27 12:30:00'
fill_in 'Value', with: '9.6'
click_button 'Create'
click_button 'Add'

visit new_glucose_measurement_url(as: user)
fill_in 'Date and time', with: '2016-01-27 13:00:00'
fill_in 'Value', with: '6.5'
click_button 'Create'
click_button 'Add'

expect(page).to have_content '12:00'
expect(page).to have_content '12:30'
Expand All @@ -50,7 +50,7 @@
click_link '13:00'
expect(page).to have_content 'Glucose'
expect(page).to have_field 'Date and time'
expect(page).to have_selector 'input[type=submit][value="Update Glucose measurement"]'
expect(page).to have_selector 'input[type=submit][value="Update"]'
expect(page).to have_link 'Delete', href: '/glucose/3'
expect(page).to have_link 'Back', href: '/glucose'

Expand Down
10 changes: 5 additions & 5 deletions spec/requests/medication_events_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
fill_in 'Date and time', with: '2016-01-27 18:53:00'
fill_in 'Dose', with: '10.0'
select 'humalog', from: 'Insulin'
click_button 'Create'
click_button 'Add'
}.to change(MedicationEvent, :count).by 1

within 'th' do
Expand Down Expand Up @@ -36,20 +36,20 @@
fill_in 'Date and time', with: '2016-02-28 14:00:00'
fill_in 'Dose', with: '10.5'
select 'humalog', from: 'Insulin'
click_button 'Create'
click_button 'Add'
expect(page.all('td').map { |cell| cell.text }).to eq ['14:00', '10.5', 'humalog']

visit new_medication_event_url(as: user)
fill_in 'Date and time', with: '2016-02-25 10:00:00'
fill_in 'Dose', with: '5.5'
select 'humalog', from: 'Insulin'
click_button 'Create'
click_button 'Add'

visit new_medication_event_url(as: user)
fill_in 'Date and time', with: '2016-02-27 17:00:00'
fill_in 'Dose', with: '8.0'
select 'lantus', from: 'Insulin'
click_button 'Create'
click_button 'Add'

expect(page).to have_content 'Sunday February 28th'
expect(page).to have_content '14:00'
Expand All @@ -64,7 +64,7 @@
expect(page).to have_content 'Meds'
expect(page).to have_field 'Date and time'
expect(page).to have_select 'Insulin', options: ['humalog', 'lantus']
expect(page).to have_selector 'input[type=submit][value="Update Medication event"]'
expect(page).to have_selector 'input[type=submit][value="Update"]'
expect(page).to have_link 'Delete', href: '/meds/1'
expect(page).to have_link 'Back', href: '/meds'

Expand Down

0 comments on commit e87b86e

Please sign in to comment.