Petr, if you have other ideas how to fix this, I am open to suggestions, but as I mention in commit message, I don't think these particular assertions add much value, and I would not want to have a conditional check in this instance.
-j
Rails changed the return string for RecordNotFound between the 3.0.x series, and the 3.2 series. The former returns "ID" and tha latter returns "id". While inconvenient, this really just pointed out some brittle tests that probably should not have been checking a string match to begin with. I am simply removing the offending assertions, as they seem to add little value anyway. --- src/spec/controllers/providers_controller_spec.rb | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/src/spec/controllers/providers_controller_spec.rb b/src/spec/controllers/providers_controller_spec.rb index fc60095..42c6560 100644 --- a/src/spec/controllers/providers_controller_spec.rb +++ b/src/spec/controllers/providers_controller_spec.rb @@ -186,7 +186,6 @@ describe ProvidersController do it { subject.xpath('//error').size.should be_eql(1) subject.xpath('//error/code').text.should be_eql('RecordNotFound') - subject.xpath('//error/message').text.should be_eql("Couldn't find Provider with ID=1") }
end @@ -271,7 +270,6 @@ describe ProvidersController do it { subject.xpath('//error').size.should be_eql(1) subject.xpath('//error/code').text.should be_eql('RecordNotFound') - subject.xpath('//error/message').text.should be_eql("Couldn't find Provider with ID=#{provider.id}") } end end @@ -349,7 +347,6 @@ describe ProvidersController do it { subject.xpath('//error').size.should be_eql(1) subject.xpath('//error/code').text.should be_eql('RecordNotFound') - subject.xpath('//error/message').text.should be_eql("Couldn't find Provider with ID=#{orig_provider.id}") } end end # non existing provider
On Wednesday, July 25, 2012 06:16:31 PM Jason Guiditta wrote:
Petr, if you have other ideas how to fix this, I am open to suggestions, but as I mention in commit message, I don't think these particular assertions add much value, and I would not want to have a conditional check in this instance.
-j
One way is to change the message in conductor when exception is cought but I think this will be unnecessary work.
I am ok with omitting tests with id. NotFound should be good enough.
Thanks
aeolus-devel@lists.fedorahosted.org