Skip to content

Commit

Permalink
Merge pull request #64 from jessieay/master
Browse files Browse the repository at this point in the history
Make scaffold example valid RSpec
  • Loading branch information
zachmargolis committed Mar 16, 2015
2 parents fc692a2 + ef8056f commit 86bf338
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end
To enable fdoc for an endpoint, add the `fdoc` option with the path to the endpoint. fdoc will intercept all calls to `get`, `post`, `put`, and `delete` and verify those parameters accordingly.

```ruby
context "#show", :fdoc => 'members/list' do
context "#show", fdoc: 'members/list' do
# ...
end
```
Expand Down Expand Up @@ -152,7 +152,7 @@ Our spec file, `spec/controllers/members_controller_spec.rb` looks like:
require 'fdoc/spec_watcher'
describe MembersController do
context "#show", :fdoc => "members/list" do
context "#show", fdoc: "members/list" do
it "can take an offset" do
get :show, {
:offset => 5
Expand Down
12 changes: 7 additions & 5 deletions docs/scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ require 'fdoc/spec_watcher'
describe MembersController do
include Fdoc::SpecWatcher

context "#list", :fdoc => 'members/list' do
get :list, {
:limit => 10,
:older_than => Time.gm(2012,"jun",21,10,40,00)
}
context "#list", fdoc: 'members/list' do
it "lists members scoped to age" do
get :list, {
limit: 10,
older_than: Time.gm(2012,"jun",21,10,40,00)
}
end
end
end
````
Expand Down

0 comments on commit 86bf338

Please sign in to comment.