... | ... | @@ -16,7 +16,7 @@ test "should list skus not generated" do |
|
|
end
|
|
|
```
|
|
|
|
|
|
Example of stub using mocha.
|
|
|
Another example of stub this time using the [mocha](https://github.com/freerange/mocha) gem. In this example we used a stub to fake the return value of any instance of the method *send_to_gogrids*. This method invokes a service that is used to send an order to an external system. The service returns a link to a file. Since our focus is not to test the integration between the two systems, we stub the method and make it return some predefined url.
|
|
|
|
|
|
```ruby
|
|
|
test "should allow director to send order to production" do
|
... | ... | @@ -40,5 +40,4 @@ test "should allow director to send order to production" do |
|
|
|
|
|
assert page.has_content?('Em Produção')
|
|
|
end
|
|
|
end
|
|
|
``` |
|
|
\ No newline at end of file |