Skip to content

Instantly share code, notes, and snippets.

@ksob
Created July 2, 2014 12:35
Show Gist options
  • Save ksob/a7188d2bd7da1b937253 to your computer and use it in GitHub Desktop.
Save ksob/a7188d2bd7da1b937253 to your computer and use it in GitHub Desktop.
Issue on mysageone_pl / _es
There is a problem that shows up in Ruby 2.1.x (Jenkins is running it)
Chuck LeDuc Díaz: I downgraded your mysageone_pl build to 2.0.0-p451 and it works
Chuck LeDuc Díaz: http://jenkins.sage1.es/job/mysageone_pl/42/console
Chuck LeDuc Díaz: we have the same problem in sageone_es
Chuck LeDuc Díaz: but I don't know what causes it.
I copied promo code functionality from _es but have problem with tests.
Working locally on my Mac all tests passes (bundle exec fudge build) but on UAT, the Jenkins build fails.
Failures:
1) MysageonePl::PromoCode it should behave like MysageonePl::PromoCode scopes filter_by_status should return all referral codes if given `all` as param
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
Shared Example Group: "MysageonePl::PromoCode" called from ./spec/models/promo_code_spec.rb:5
 # /var/lib/jenkins/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-mocks-2.13.1/lib/rspec/mocks/message_expectation.rb:167
2) simmilar ...
And here are the failing tests:
it 'should return all referral codes if given `all` as param' do
MysageonePl::PromoCode.should_not_receive(:scoped).at_least(:once).and_call_original
described_class.filter_by_status('all')
end
it 'should return all referral codes if given other value as param' do
MysageonePl::PromoCode.should_receive(:scoped).at_least(:once).and_call_original
described_class.filter_by_status('foo')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment