Commit 94715b97632ce3e7c28a90f275ef646fc4f0c256
1 parent
cbd6c501
Exists in
master
and in
1 other branch
make errs vs errors more consistent.
Also: fix tests.
Showing
8 changed files
with
12 additions
and
12 deletions
Show diff stats
app/controllers/problems_controller.rb
... | ... | @@ -78,7 +78,7 @@ class ProblemsController < ApplicationController |
78 | 78 | |
79 | 79 | def resolve |
80 | 80 | problem.resolve! |
81 | - flash[:success] = 'Great news everyone! The err has been resolved.' | |
81 | + flash[:success] = 'Great news everyone! The error has been resolved.' | |
82 | 82 | redirect_to :back |
83 | 83 | rescue ActionController::RedirectBackError |
84 | 84 | redirect_to app_path(app) | ... | ... |
app/views/mailer/comment_notification.html.haml
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | %span.bold= @problem.environment |
14 | 14 | environment. |
15 | 15 | %br |
16 | - This err has occurred #{pluralize @problem.notices_count, 'time'}. | |
16 | + This error has occurred #{pluralize @problem.notices_count, 'time'}. | |
17 | 17 | %p |
18 | 18 | = link_to("Click here to view the error and add a comment on Errbit", app_problem_url(@app, @problem), :class => "bold") << "." |
19 | 19 | ... | ... |
app/views/mailer/comment_notification.text.erb
1 | 1 | <%= @user.name %> has just commented on an error that occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> |
2 | 2 | |
3 | -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: | |
3 | +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: | |
4 | 4 | |
5 | 5 | <%= app_problem_url(@app, @notice.problem) %> |
6 | 6 | ... | ... |
app/views/mailer/err_notification.html.haml
... | ... | @@ -6,13 +6,13 @@ |
6 | 6 | %td.content(valign="top") |
7 | 7 | %div |
8 | 8 | %p |
9 | - An err has just occurred in | |
9 | + An error has just occurred in | |
10 | 10 | = link_to(@app.name, app_url(@app), :class => "bold") << "," |
11 | 11 | on the |
12 | 12 | %span.bold= @notice.environment_name |
13 | 13 | environment. |
14 | 14 | %br |
15 | - This err has occurred #{pluralize @notice.problem.notices_count, 'time'}. | |
15 | + This error has occurred #{pluralize @notice.problem.notices_count, 'time'}. | |
16 | 16 | %p |
17 | 17 | = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "." |
18 | 18 | %tr | ... | ... |
app/views/mailer/err_notification.text.erb
1 | -An err has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> | |
1 | +An error has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> | |
2 | 2 | |
3 | -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: | |
3 | +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: | |
4 | 4 | |
5 | 5 | <%= app_problem_url(@app, @notice.problem) %> |
6 | 6 | ... | ... |
spec/controllers/problems_controller_spec.rb
... | ... | @@ -405,12 +405,12 @@ describe ProblemsController, type: 'controller' do |
405 | 405 | |
406 | 406 | it "should display a message about 1 err" do |
407 | 407 | post :resolve_several, :problems => [@problem2.id.to_s] |
408 | - expect(flash[:success]).to match(/1 err has been resolved/) | |
408 | + expect(flash[:success]).to match(/1 error has been resolved/) | |
409 | 409 | end |
410 | 410 | |
411 | 411 | it "should display a message about 2 errs" do |
412 | 412 | post :resolve_several, :problems => [@problem1.id.to_s, @problem2.id.to_s] |
413 | - expect(flash[:success]).to match(/2 errs have been resolved/) | |
413 | + expect(flash[:success]).to match(/2 errors have been resolved/) | |
414 | 414 | expect(controller.selected_problems).to eq [@problem1, @problem2] |
415 | 415 | end |
416 | 416 | end | ... | ... |
spec/mailers/mailer_spec.rb
... | ... | @@ -92,7 +92,7 @@ describe Mailer do |
92 | 92 | end |
93 | 93 | |
94 | 94 | it "should have the notices count in the body" do |
95 | - expect(@email).to have_body_text("This err has occurred 2 times") | |
95 | + expect(@email).to have_body_text("This error has occurred 2 times") | |
96 | 96 | end |
97 | 97 | |
98 | 98 | it "should have the comment body" do | ... | ... |
spec/views/apps/show.html.haml_spec.rb
... | ... | @@ -17,14 +17,14 @@ describe "apps/show.html.haml", type: 'view' do |
17 | 17 | it "should confirm the 'cancel' link" do |
18 | 18 | render |
19 | 19 | |
20 | - expect(action_bar).to have_selector('a.button', :text => 'all errs') | |
20 | + expect(action_bar).to have_selector('a.button', :text => 'all errors') | |
21 | 21 | end |
22 | 22 | end |
23 | 23 | |
24 | 24 | context "without errs" do |
25 | 25 | it 'see no errs' do |
26 | 26 | render |
27 | - expect(rendered).to match(/No errs have been/) | |
27 | + expect(rendered).to match(/No errors have been/) | |
28 | 28 | end |
29 | 29 | end |
30 | 30 | ... | ... |