Commit 236fe11928a0eb0233ed07a7e29a17535b8c83eb

Authored by Rafael Manzo
1 parent 865b8ea6

shoulda-matchers updated to 2.6.1.rc1

Gemfile
... ... @@ -62,7 +62,7 @@ gem 'spring', group: :development
62 62  
63 63 group :test do
64 64 # Easier test writing
65   - gem "shoulda-matchers", require: false # not requiring is necessary to avoid warnings from minitest 5, with version 2.6 this might get fixed
  65 + gem "shoulda-matchers", '~> 2.6.1.rc1'
66 66  
67 67 # Test coverage
68 68 gem 'simplecov', require: false
... ...
Gemfile.lock
... ... @@ -200,7 +200,7 @@ GEM
200 200 sdoc (0.4.0)
201 201 json (~> 1.8)
202 202 rdoc (~> 4.0, < 5.0)
203   - shoulda-matchers (2.6.0)
  203 + shoulda-matchers (2.6.1.rc1)
204 204 activesupport (>= 3.0.0)
205 205 simplecov (0.8.2)
206 206 docile (~> 1.1.0)
... ... @@ -283,7 +283,7 @@ DEPENDENCIES
283 283 rspec-rails
284 284 sass-rails (~> 4.0.1)
285 285 sdoc
286   - shoulda-matchers
  286 + shoulda-matchers (~> 2.6.1.rc1)
287 287 simplecov
288 288 spring
289 289 sqlite3
... ...
spec/controllers/mezuro_ranges_controller_spec.rb
... ... @@ -3,7 +3,7 @@ require &#39;spec_helper&#39;
3 3 describe MezuroRangesController do
4 4 let(:mezuro_range) { FactoryGirl.build(:mezuro_range, id: 1) }
5 5 let(:metric_configuration) { FactoryGirl.build(:metric_configuration) }
6   -
  6 +
7 7 describe 'new' do
8 8 let(:mezuro_configuration) { FactoryGirl.build(:mezuro_configuration) }
9 9  
... ... @@ -107,12 +107,12 @@ describe MezuroRangesController do
107 107 it { should redirect_to new_user_session_path }
108 108 end
109 109 end
110   -
  110 +
111 111 describe 'edit' do
112 112 let(:metric_configuration) { FactoryGirl.build(:metric_configuration) }
113 113 let(:mezuro_range) { FactoryGirl.build(:mezuro_range, id: 1, metric_configuration_id: metric_configuration.id) }
114 114 let(:reading) { FactoryGirl.build(:reading, group_id: metric_configuration.reading_group_id) }
115   -
  115 +
116 116 context 'with an User logged in' do
117 117 before do
118 118 sign_in FactoryGirl.create(:user)
... ... @@ -132,7 +132,7 @@ describe MezuroRangesController do
132 132  
133 133 context 'when the user does not own the mezuro range' do
134 134 let!(:reading_group) { FactoryGirl.build(:reading_group, id: metric_configuration.reading_group_id) }
135   -
  135 +
136 136 before do
137 137 get :edit, id: mezuro_range.id, mezuro_configuration_id: metric_configuration.configuration_id, metric_configuration_id: metric_configuration.id
138 138 end
... ... @@ -151,7 +151,7 @@ describe MezuroRangesController do
151 151 it { should redirect_to new_user_session_path }
152 152 end
153 153 end
154   -
  154 +
155 155 describe 'update' do
156 156 let(:metric_configuration) { FactoryGirl.build(:metric_configuration) }
157 157 let(:mezuro_range) { FactoryGirl.build(:mezuro_range, id: 1, metric_configuration_id: metric_configuration.id) }
... ...
spec/controllers/repositories_controller_spec.rb
... ... @@ -173,11 +173,7 @@ describe RepositoriesController do
173 173  
174 174 it { should redirect_to(projects_url) }
175 175 it { should respond_with(:redirect) }
176   - it 'should set the flash' do
177   - pending 'incompability between shoulda-matchers and Rails 4.1.0.rc1' do
178   - should set_the_flash[:notice].to("You're not allowed to do this operation")
179   - end
180   - end
  176 + it { should set_the_flash[:notice].to("You're not allowed to do this operation") }
181 177 end
182 178 end
183 179  
... ...
spec/routing/readings_routing_spec.rb
... ... @@ -15,6 +15,6 @@ describe ReadingsController do
15 15 it { should route(:put, '/reading_groups/1/readings/1').
16 16 to(controller: :readings, action: :update, reading_group_id: 1, id: 1) }
17 17 it { should_not route(:get, '/reading_groups/1/readings').
18   - to(controller: :readings, action: :index, reading_group_id: 1) }
19   - end
  18 + to(controller: :readings, action: :index, reading_group_id: 1) }
  19 + end
20 20 end
... ...
spec/spec_helper.rb
... ... @@ -24,7 +24,6 @@ ENV[&quot;RAILS_ENV&quot;] ||= &#39;test&#39;
24 24 require File.expand_path("../../config/environment", __FILE__)
25 25 require 'rspec/rails'
26 26 require 'rspec/autorun'
27   -require 'shoulda-matchers' # requiring here is necessary to avoid warnings from minitest 5, with version 2.6 this might get fixed
28 27  
29 28 # Requires supporting ruby files with custom matchers and macros, etc,
30 29 # in spec/support/ and its subdirectories.
... ...