lib/api_pi/dsl.rb in api_pi-0.9 vs lib/api_pi/dsl.rb in api_pi-0.9.2
- old
+ new
@@ -14,22 +14,22 @@
self.instance_eval(&block)
pi = ApiPi::Case.new(url, tests)
pi.investigate
end
- # Test blocks are used to group similar assertions into readable units.
- #
+ # Test blocks are used to group similar assertions into readable units.
+ #
# For example, you may want to put your header tests into one test block:
- #
+ #
# get 'example.com/user.json' do
# test 'Headers have correct data' do
# # You header assertions...
# end
# end
- #
+ #
# Inside of the test block, you would then put your header assertions.
- # onceyou run your tests, your test blocks are grouped together and
- # pass/fail based on assertions in the test block.
+ # onceyou run your tests, your test blocks are grouped together and
+ # pass/fail based on assertions in the test block.
def test desc, &block
@tests[desc] = block
end
end