@@ -59,17 +59,17 @@ Feature: Generate Markdown documentation from test examples
5959 response_field :page, "Current page"
6060
6161 example_request 'Getting a list of orders' do
62- status.should eq(200)
63- response_body.should eq('{"page":1,"orders":[{"name":"Order 1","amount":9.99,"description":null},{"name":"Order 2","amount":100.0,"description":"A great order"}]}')
62+ expect( status).to eq(200)
63+ expect( response_body).to eq('{"page":1,"orders":[{"name":"Order 1","amount":9.99,"description":null},{"name":"Order 2","amount":100.0,"description":"A great order"}]}')
6464 end
6565 end
6666
6767 get '/orders/:id' do
6868 let(:id) { 1 }
6969
7070 example_request 'Getting a specific order' do
71- status.should eq(200)
72- response_body.should == '{"order":{"name":"Order 1","amount":100.0,"description":"A great order"}}'
71+ expect( status).to eq(200)
72+ expect( response_body).to eq( '{"order":{"name":"Order 1","amount":100.0,"description":"A great order"}}')
7373 end
7474 end
7575
@@ -82,7 +82,7 @@ Feature: Generate Markdown documentation from test examples
8282 let(:amount) { 33.0 }
8383
8484 example_request 'Creating an order' do
85- status.should == 201
85+ expect( status).to eq( 201)
8686 end
8787 end
8888
@@ -95,24 +95,26 @@ Feature: Generate Markdown documentation from test examples
9595 let(:name) { "Updated name" }
9696
9797 example_request 'Updating an order' do
98- status.should == 200
98+ expect( status).to eq( 200)
9999 end
100100 end
101101
102102 delete "/orders/:id" do
103103 let(:id) { 1 }
104104
105105 example_request "Deleting an order" do
106- status.should == 200
106+ expect( status).to eq( 200)
107107 end
108108 end
109109 end
110110
111111 resource 'Help' do
112+ explanation 'Getting help'
113+
112114 get '/help' do
113115 example_request 'Getting welcome message' do
114- status.should eq(200)
115- response_body.should == 'Welcome Henry !'
116+ expect( status).to eq(200)
117+ expect( response_body).to eq( 'Welcome Henry !')
116118 end
117119 end
118120
@@ -149,6 +151,8 @@ Feature: Generate Markdown documentation from test examples
149151
150152 ## Help
151153
154+ Getting help
155+
152156 * [Getting welcome message](help/getting_welcome_message.markdown)
153157
154158 ## Orders
@@ -212,7 +216,6 @@ Feature: Generate Markdown documentation from test examples
212216 }
213217 ]
214218 }</pre>
215-
216219 """
217220
218221 Scenario : Example 'Creating an order' file should look like we expect
0 commit comments