Commit 391d162a9de4d2b76504c84b53e1f5747a8d5ba3
1 parent
1d72a926
Exists in
master
and in
1 other branch
Making tests pass on Ruby 1.8.7.
Showing
4 changed files
with
18 additions
and
19 deletions
Show diff stats
app/views/apps/show.html.haml
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | - if @all_errs == true | 16 | - if @all_errs == true |
17 | = link_to 'unresolved errs', app_path(@app), :class => 'button' | 17 | = link_to 'unresolved errs', app_path(@app), :class => 'button' |
18 | - else | 18 | - else |
19 | - = link_to 'all errs', app_path(@app, {all_errs: true}), :class => 'button' | 19 | + = link_to 'all errs', app_path(@app, {:all_errs => true}), :class => 'button' |
20 | 20 | ||
21 | %h3{:id => 'watchers_toggle'} | 21 | %h3{:id => 'watchers_toggle'} |
22 | Watchers | 22 | Watchers |
app/views/errs/_table.html.haml
@@ -13,9 +13,9 @@ | @@ -13,9 +13,9 @@ | ||
13 | %td.app | 13 | %td.app |
14 | = link_to err.app.name, app_path(err.app) | 14 | = link_to err.app.name, app_path(err.app) |
15 | - if current_page?(:controller => 'errs') | 15 | - if current_page?(:controller => 'errs') |
16 | - %span.environment= link_to err.environment, errs_path(environment: err.environment) | 16 | + %span.environment= link_to err.environment, errs_path(:environment => err.environment) |
17 | - else | 17 | - else |
18 | - %span.environment= link_to err.environment, app_path(err.app, environment: err.environment) | 18 | + %span.environment= link_to err.environment, app_path(err.app, :environment => err.environment) |
19 | %td.message | 19 | %td.message |
20 | = link_to err.message, app_err_path(err.app, err) | 20 | = link_to err.message, app_err_path(err.app, err) |
21 | %em= err.where | 21 | %em= err.where |
spec/controllers/apps_controller_spec.rb
@@ -77,20 +77,20 @@ describe AppsController do | @@ -77,20 +77,20 @@ describe AppsController do | ||
77 | 77 | ||
78 | context 'with resolved errors' do | 78 | context 'with resolved errors' do |
79 | before(:each) do | 79 | before(:each) do |
80 | - resolved_err = Factory.create(:err, app: @app, resolved: true) | ||
81 | - Factory.create(:notice, err: resolved_err) | 80 | + resolved_err = Factory.create(:err, :app => @app, :resolved => true) |
81 | + Factory.create(:notice, :err => resolved_err) | ||
82 | end | 82 | end |
83 | 83 | ||
84 | context 'and no params' do | 84 | context 'and no params' do |
85 | it 'shows only unresolved errs' do | 85 | it 'shows only unresolved errs' do |
86 | - get :show, id: @app.id | 86 | + get :show, :id => @app.id |
87 | assigns(:errs).size.should == 1 | 87 | assigns(:errs).size.should == 1 |
88 | end | 88 | end |
89 | end | 89 | end |
90 | 90 | ||
91 | context 'and all_errs=true params' do | 91 | context 'and all_errs=true params' do |
92 | it 'shows all errors' do | 92 | it 'shows all errors' do |
93 | - get :show, id: @app.id, all_errs: true | 93 | + get :show, :id => @app.id, :all_errs => true |
94 | assigns(:errs).size.should == 2 | 94 | assigns(:errs).size.should == 2 |
95 | end | 95 | end |
96 | end | 96 | end |
@@ -100,41 +100,41 @@ describe AppsController do | @@ -100,41 +100,41 @@ describe AppsController do | ||
100 | before(:each) do | 100 | before(:each) do |
101 | environments = ['production', 'test', 'development', 'staging'] | 101 | environments = ['production', 'test', 'development', 'staging'] |
102 | 20.times do |i| | 102 | 20.times do |i| |
103 | - Factory.create(:err, app: @app, environment: environments[i % environments.length]) | 103 | + Factory.create(:err, :app => @app, :environment => environments[i % environments.length]) |
104 | end | 104 | end |
105 | end | 105 | end |
106 | 106 | ||
107 | context 'no params' do | 107 | context 'no params' do |
108 | it 'shows errs for all environments' do | 108 | it 'shows errs for all environments' do |
109 | - get :show, id: @app.id | 109 | + get :show, :id => @app.id |
110 | assigns(:errs).size.should == 21 | 110 | assigns(:errs).size.should == 21 |
111 | end | 111 | end |
112 | end | 112 | end |
113 | 113 | ||
114 | context 'environment production' do | 114 | context 'environment production' do |
115 | it 'shows errs for just production' do | 115 | it 'shows errs for just production' do |
116 | - get :show, id: @app.id, environment: :production | 116 | + get :show, :id => @app.id, :environment => :production |
117 | assigns(:errs).size.should == 6 | 117 | assigns(:errs).size.should == 6 |
118 | end | 118 | end |
119 | end | 119 | end |
120 | 120 | ||
121 | context 'environment staging' do | 121 | context 'environment staging' do |
122 | it 'shows errs for just staging' do | 122 | it 'shows errs for just staging' do |
123 | - get :show, id: @app.id, environment: :staging | 123 | + get :show, :id => @app.id, :environment => :staging |
124 | assigns(:errs).size.should == 5 | 124 | assigns(:errs).size.should == 5 |
125 | end | 125 | end |
126 | end | 126 | end |
127 | 127 | ||
128 | context 'environment development' do | 128 | context 'environment development' do |
129 | it 'shows errs for just development' do | 129 | it 'shows errs for just development' do |
130 | - get :show, id: @app.id, environment: :development | 130 | + get :show, :id => @app.id, :environment => :development |
131 | assigns(:errs).size.should == 5 | 131 | assigns(:errs).size.should == 5 |
132 | end | 132 | end |
133 | end | 133 | end |
134 | 134 | ||
135 | context 'environment test' do | 135 | context 'environment test' do |
136 | it 'shows errs for just test' do | 136 | it 'shows errs for just test' do |
137 | - get :show, id: @app.id, environment: :test | 137 | + get :show, :id => @app.id, :environment => :test |
138 | assigns(:errs).size.should == 5 | 138 | assigns(:errs).size.should == 5 |
139 | end | 139 | end |
140 | end | 140 | end |
@@ -435,4 +435,3 @@ describe AppsController do | @@ -435,4 +435,3 @@ describe AppsController do | ||
435 | end | 435 | end |
436 | 436 | ||
437 | end | 437 | end |
438 | - |
spec/controllers/errs_controller_spec.rb
@@ -53,7 +53,7 @@ describe ErrsController do | @@ -53,7 +53,7 @@ describe ErrsController do | ||
53 | before(:each) do | 53 | before(:each) do |
54 | environments = ['production', 'test', 'development', 'staging'] | 54 | environments = ['production', 'test', 'development', 'staging'] |
55 | 20.times do |i| | 55 | 20.times do |i| |
56 | - Factory.create(:err, environment: environments[i % environments.length]) | 56 | + Factory.create(:err, :environment => environments[i % environments.length]) |
57 | end | 57 | end |
58 | end | 58 | end |
59 | 59 | ||
@@ -66,28 +66,28 @@ describe ErrsController do | @@ -66,28 +66,28 @@ describe ErrsController do | ||
66 | 66 | ||
67 | context 'environment production' do | 67 | context 'environment production' do |
68 | it 'shows errs for just production' do | 68 | it 'shows errs for just production' do |
69 | - get :index, environment: :production | 69 | + get :index, :environment => :production |
70 | assigns(:errs).size.should == 6 | 70 | assigns(:errs).size.should == 6 |
71 | end | 71 | end |
72 | end | 72 | end |
73 | 73 | ||
74 | context 'environment staging' do | 74 | context 'environment staging' do |
75 | it 'shows errs for just staging' do | 75 | it 'shows errs for just staging' do |
76 | - get :index, environment: :staging | 76 | + get :index, :environment => :staging |
77 | assigns(:errs).size.should == 5 | 77 | assigns(:errs).size.should == 5 |
78 | end | 78 | end |
79 | end | 79 | end |
80 | 80 | ||
81 | context 'environment development' do | 81 | context 'environment development' do |
82 | it 'shows errs for just development' do | 82 | it 'shows errs for just development' do |
83 | - get :index, environment: :development | 83 | + get :index, :environment => :development |
84 | assigns(:errs).size.should == 5 | 84 | assigns(:errs).size.should == 5 |
85 | end | 85 | end |
86 | end | 86 | end |
87 | 87 | ||
88 | context 'environment test' do | 88 | context 'environment test' do |
89 | it 'shows errs for just test' do | 89 | it 'shows errs for just test' do |
90 | - get :index, environment: :test | 90 | + get :index, :environment => :test |
91 | assigns(:errs).size.should == 5 | 91 | assigns(:errs).size.should == 5 |
92 | end | 92 | end |
93 | end | 93 | end |