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