-
Notifications
You must be signed in to change notification settings - Fork 66
Output Formats
garethrees edited this page Jan 21, 2013
·
2 revisions
Examples of the various output formats of Turn.
Tests being run are from Nettuts' TDD API Wrapper Tutorial.
Turn config used:
Turn.config do |c|
c.format = SETTING
c.natural = true
end
Started at 2013-01-21 23:18:58 +0000 w/ seed 6535.
Dish::Player::GET profile
PASS (0:00:00.017) 0001 records the fixture
PASS (0:00:00.018) 0002 must have a profile method
PASS (0:00:00.046) 0003 must parse the api response from JSON hash
PASS (0:00:00.059) 0004 must perform the request and get the data
Dish::Player::GET profile::caching
PASS (0:00:00.073) 0001 must cache the profile
PASS (0:00:00.091) 0002 must refresh the profile if forced
Dish::Player::GET profile::dynamic attributes
FAIL (0:00:00.147) 0001 must return the attribute value if present in profile
Expected: 1
Actual: nil
@ (eval):8:in `must_equal'
spec/lib/dish/player_spec.rb:64:in `block (4 levels) in <top (required)>'
FAIL (0:00:00.164) 0002 must raise method missing if attribute is not present
NoMethodError expected but nothing was raised.
@ (eval):4:in `must_raise'
spec/lib/dish/player_spec.rb:68:in `block (4 levels) in <top (required)>'
Dish::Player::default attributes
PASS (0:00:00.167) 0001 must include httparty methods
PASS (0:00:00.167) 0002 must have the base url set to the Dribble API endpoint
Dish::Player::default instance attributes
PASS (0:00:00.167) 0001 must have an id attribute
PASS (0:00:00.168) 0002 must have the right id
Finished in 0.168510 seconds.
12 tests, 10 passed, 2 failures, 0 errors, 0 skips, 12 assertions
......FF....
Finished in 0.16353 seconds.
FAIL
Expected: 1
Actual: nil
(eval):8:in `must_equal'
spec/lib/dish/player_spec.rb:64:in `block (4 levels) in <top (required)>'
FAIL
NoMethodError expected but nothing was raised.
(eval):4:in `must_raise'
spec/lib/dish/player_spec.rb:68:in `block (4 levels) in <top (required)>'
Dish::Player
Dish::Player::GET profile
0004 must perform the request and get the data PASS
0002 must have a profile method PASS
0001 records the fixture PASS
0003 must parse the api response from JSON hash PASS
Dish::Player::GET profile::caching
0001 must cache the profile PASS
0002 must refresh the profile if forced PASS
Dish::Player::GET profile::dynamic attributes
0001 must return the attribute value if present in profile FAIL
Expected: 1
Actual: nil
[c,i,q,r,t,#,?] c
0002 must raise method missing if attribute is not present FAIL
NoMethodError expected but nothing was raised.
[c,i,q,r,t,#,?] c
Dish::Player::default attributes
0002 must have the base url set to the Dribble API endpoint PASS
0001 must include httparty methods PASS
Dish::Player::default instance attributes
0001 must have an id attribute PASS
0002 must have the right id PASS
PASS
==============================================================================
pass: 10, fail: 2, error: 0, skip: 0
total: 12 tests with 12 assertions in 1.716178 seconds
==============================================================================
## Marshal
--- !ruby/object:Turn::TestSuite
name: ''
cases:
- !ruby/object:Turn::TestCase
name: Dish::Player
files:
- Dish::Player
tests: []
message:
count_assertions: 0
- !ruby/object:Turn::TestCase
name: Dish::Player::GET profile
files:
- Dish::Player::GET profile
tests:
- !ruby/object:Turn::TestMethod
name: test_0004_must perform the request and get the data
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0003_must parse the api response from JSON hash
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0001_records the fixture
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0002_must have a profile method
fail: false
error: false
skip: false
raised:
message:
backtrace: []
message:
count_assertions: 3
- !ruby/object:Turn::TestCase
name: Dish::Player::GET profile::caching
files:
- Dish::Player::GET profile::caching
tests:
- !ruby/object:Turn::TestMethod
name: test_0001_must cache the profile
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0002_must refresh the profile if forced
fail: false
error: false
skip: false
raised:
message:
backtrace: []
message:
count_assertions: 2
- !ruby/object:Turn::TestCase
name: Dish::Player::GET profile::dynamic attributes
files:
- Dish::Player::GET profile::dynamic attributes
tests:
- !ruby/object:Turn::TestMethod
name: test_0001_must return the attribute value if present in profile
fail: true
error: false
skip: false
raised: !ruby/exception:MiniTest::Assertion
message: ! "Expected: 1\n Actual: nil"
message: ! "Expected: 1\n Actual: nil"
backtrace:
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:193:in
`assert'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:233:in
`assert_equal'
- !binary |-
KGV2YWwpOjg6aW4gYG11c3RfZXF1YWwn
- /Users/gareth/Code/dish/spec/lib/dish/player_spec.rb:64:in `block (4 levels)
in <top (required)>'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1294:in
`run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:91:in
`block in _run_suite'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:84:in
`map'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:84:in
`_run_suite'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`block in _run_suites'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`map'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`_run_suites'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:860:in
`_run_anything'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1053:in
`run_tests'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1040:in
`block in _run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1039:in
`each'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1039:in
`_run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1028:in
`run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:782:in
`block in autorun'
- !ruby/object:Turn::TestMethod
name: test_0002_must raise method missing if attribute is not present
fail: true
error: false
skip: false
raised: !ruby/exception:MiniTest::Assertion
message: NoMethodError expected but nothing was raised.
message: NoMethodError expected but nothing was raised.
backtrace:
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:193:in
`assert'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:550:in
`flunk'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:385:in
`assert_raises'
- !binary |-
KGV2YWwpOjQ6aW4gYG11c3RfcmFpc2Un
- /Users/gareth/Code/dish/spec/lib/dish/player_spec.rb:68:in `block (4 levels)
in <top (required)>'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1294:in
`run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:91:in
`block in _run_suite'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:84:in
`map'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:84:in
`_run_suite'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`block in _run_suites'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`map'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/turn-0.9.6/lib/turn/runners/minirunner.rb:61:in
`_run_suites'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:860:in
`_run_anything'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1053:in
`run_tests'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1040:in
`block in _run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1039:in
`each'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1039:in
`_run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:1028:in
`run'
- /Users/gareth/.rvm/gems/ruby-1.9.3-p327/gems/minitest-4.3.2/lib/minitest/unit.rb:782:in
`block in autorun'
message:
count_assertions: 2
- !ruby/object:Turn::TestCase
name: Dish::Player::default attributes
files:
- Dish::Player::default attributes
tests:
- !ruby/object:Turn::TestMethod
name: test_0001_must include httparty methods
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0002_must have the base url set to the Dribble API endpoint
fail: false
error: false
skip: false
raised:
message:
backtrace: []
message:
count_assertions: 3
- !ruby/object:Turn::TestCase
name: Dish::Player::default instance attributes
files:
- Dish::Player::default instance attributes
tests:
- !ruby/object:Turn::TestMethod
name: test_0001_must have an id attribute
fail: false
error: false
skip: false
raised:
message:
backtrace: []
- !ruby/object:Turn::TestMethod
name: test_0002_must have the right id
fail: false
error: false
skip: false
raised:
message:
backtrace: []
message:
count_assertions: 2
size: 6
seed: 1063
==============================================================================
SUITE (SEED 51794)
==============================================================================
Dish::Player::GET profile
0001 records the fixture 0:00:00.025 PASS
0002 must have a profile method 0:00:00.025 PASS
0003 must parse the api response from JSON hash 0:00:00.065 PASS
0004 must perform the request and get the data 0:00:00.076 PASS
Dish::Player::GET profile::caching
0001 must cache the profile 0:00:00.088 PASS
0002 must refresh the profile if forced 0:00:00.109 PASS
Dish::Player::GET profile::dynamic attributes
0001 must return the attribute value if present in profile 0:00:00.167 FAIL
Expected: 1
Actual: nil
Assertion at:
(eval):8:in `must_equal'
spec/lib/dish/player_spec.rb:64:in `block (4 levels) in <top (required)>'
0002 must raise method missing if attribute is not present 0:00:00.183 FAIL
NoMethodError expected but nothing was raised.
Assertion at:
(eval):4:in `must_raise'
spec/lib/dish/player_spec.rb:68:in `block (4 levels) in <top (required)>'
Dish::Player::default attributes
0001 must include httparty methods 0:00:00.185 PASS
0002 must have the base url set to the Dribble API endpoint 0:00:00.185 PASS
Dish::Player::default instance attributes
0001 must have an id attribute 0:00:00.186 PASS
0002 must have the right id 0:00:00.186 PASS
==============================================================================
pass: 10, fail: 2, error: 0, skip: 0
total: 12 tests with 12 assertions in 0.186403 seconds
==============================================================================
Testing: 100% |||||||||||||||||||||||||||||||||||||||||||| Time: 00:00:00
TESTCASE TESTS ASSERTIONS FAILURES ERRORS SKIPS
---------------------------------------------------------------------------------------------------------
Dish::Player 0 0 0 0 0 [PASS]
Dish::Player::GET profile 4 3 0 0 0 [PASS]
Dish::Player::GET profile::caching 2 2 0 0 0 [PASS]
Dish::Player::GET profile::dynamic attributes 2 2 2 0 0 [FAIL]
Dish::Player::default attributes 2 3 0 0 0 [PASS]
Dish::Player::default instance attributes 2 2 0 0 0 [PASS]
---------------------------------------------------------------------------------------------------------
TOTAL 12 12 2 0 0
-- Failures --
Expected: 1
Actual: nil
(eval):8:in `must_equal'
spec/lib/dish/player_spec.rb:64:in `block (4 levels) in <top (required)>'
NoMethodError expected but nothing was raised.
(eval):4:in `must_raise'
spec/lib/dish/player_spec.rb:68:in `block (4 levels) in <top (required)>'