Closed RKushnir closed 11 years ago
What version of Bogus are you using? If it's 0.0.2
, could you try with the latest: 0.0.3
?
If you are already using it, does it help if you set the mock framework:
RSpec.configure do |config|
config.mock_with Bogus::RSpecAdapter
end
If that does not help, it would help me a lot if you pasted the versions of bundler/rspec you are using and the require order in your spec_helper.rb
file, because I did not manage to reproduce this bug locally.
@psyho I was using 0.0.2. After update to 0.0.3 it works. Thanks.
Btw, sorry for spoiling your untouched issue list :) Thank you for this cool library.
It's entirely my fault for using rc versions for a gem that did not hit 0.1.0 yet;) Let me know if you encounter any more problems.
When trying to stub a method on an object like so:
the RSpec's own
stub
method is being called, not the Bogus'. I guess, when I requirebogus/rspec
inspec_helper
it includes theBogus::MockingDSL
, but the RSpec itself is lower in the ancestor chain, so it overrides the methods with coinciding names.The
Bogus.create_stub
call works just fine.