bogus
bogus copied to clipboard
Fake library for Ruby
For example: ``` ruby class Foo def call(env) end end class Bar def call(_) end end fake(:xxx) { [Foo, Bar]}.respond_to?(:call) == false ```
The test output is not "clear" that a contract test failed, by looking only at the final output of rspec: `3 examples, 0 failures` https://www.relishapp.com/bogus/bogus/docs/contract-tests/contract-tests-with-mocks#fails-when-mocked-methods-are-not-called-on-real-object I get an exit code...
Big names supporting open source projects are aways welcomed :tada:
Aruba is quick to drop backwards compatibility in 0.x releases, and this is why master doesn’t build. This pins aruba to a version that still works. I’ll come up with...
Not sure if this is specific to RSpec 3 - I'm trying to use Bogus and have two classes that have similar contracts (as one's a subclass of another). I'd...
So I have service objects which have methods that return new entities - builders are a good example. However, if I stub out that service object to return a fake...
rspec 3.0.0.rc1 removed the `color_enabled` configuration option in favor of the newer `color` option. Travis still fails because the tests themselves have not been ported to the RSpec 3 API,...
Hi getting errors on adding factory_girl with bogus on a rbx-2.2.7: ``` rbx-2.2.7 :003 > FactoryGirl.build :category ArgumentError: method 'kind_of?': given 1, expected 0 from /Users/Ace/.rvm/gems/rbx-2.2.7@cr/gems/factory_girl-4.4.0/lib/factory_girl/decorator.rb:10:in `kind_of? (method_missing)' from /Users/Ace/.rvm/gems/rbx-2.2.7@cr/gems/factory_girl-4.4.0/lib/factory_girl/decorator.rb:14:in...
Using bogus I can stub a method on real object: ``` ruby user = FactoryGirl.create(:user) stub(user).friend?(5) { true } ``` And this works great! However, I would like to use...
Let's assume that in the production code there is a constant defined like this: ``` ruby UserValidator = Validator.new do # ... end ``` We want to be able to...