assert 2.16.5 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -7
  2. data/Gemfile +3 -1
  3. data/README.md +20 -20
  4. data/assert.gemspec +5 -3
  5. data/bin/assert +4 -4
  6. data/lib/assert.rb +8 -8
  7. data/lib/assert/assert_runner.rb +7 -7
  8. data/lib/assert/assertions.rb +5 -5
  9. data/lib/assert/cli.rb +35 -35
  10. data/lib/assert/config.rb +8 -8
  11. data/lib/assert/config_helpers.rb +6 -6
  12. data/lib/assert/context.rb +17 -17
  13. data/lib/assert/context/test_dsl.rb +5 -5
  14. data/lib/assert/context_info.rb +2 -2
  15. data/lib/assert/default_runner.rb +1 -1
  16. data/lib/assert/default_suite.rb +1 -1
  17. data/lib/assert/default_view.rb +8 -8
  18. data/lib/assert/factory.rb +1 -1
  19. data/lib/assert/macro.rb +1 -1
  20. data/lib/assert/macros/methods.rb +1 -1
  21. data/lib/assert/result.rb +17 -17
  22. data/lib/assert/runner.rb +12 -8
  23. data/lib/assert/stub.rb +1 -1
  24. data/lib/assert/suite.rb +3 -3
  25. data/lib/assert/test.rb +11 -11
  26. data/lib/assert/utils.rb +8 -8
  27. data/lib/assert/version.rb +1 -1
  28. data/lib/assert/view.rb +19 -19
  29. data/lib/assert/view_helpers.rb +6 -6
  30. data/test/helper.rb +2 -11
  31. data/test/support/factory.rb +6 -6
  32. data/test/system/stub_tests.rb +204 -204
  33. data/test/system/test_tests.rb +13 -13
  34. data/test/unit/assert_tests.rb +9 -9
  35. data/test/unit/assertions/assert_block_tests.rb +2 -2
  36. data/test/unit/assertions/assert_empty_tests.rb +6 -6
  37. data/test/unit/assertions/assert_equal_tests.rb +5 -5
  38. data/test/unit/assertions/assert_file_exists_tests.rb +6 -6
  39. data/test/unit/assertions/assert_includes_tests.rb +7 -7
  40. data/test/unit/assertions/assert_instance_of_tests.rb +5 -5
  41. data/test/unit/assertions/assert_kind_of_tests.rb +5 -5
  42. data/test/unit/assertions/assert_match_tests.rb +5 -5
  43. data/test/unit/assertions/assert_nil_tests.rb +5 -5
  44. data/test/unit/assertions/assert_raises_tests.rb +2 -2
  45. data/test/unit/assertions/assert_respond_to_tests.rb +5 -5
  46. data/test/unit/assertions/assert_same_tests.rb +13 -13
  47. data/test/unit/assertions/assert_true_false_tests.rb +7 -7
  48. data/test/unit/assertions_tests.rb +2 -2
  49. data/test/unit/config_helpers_tests.rb +5 -5
  50. data/test/unit/config_tests.rb +12 -12
  51. data/test/unit/context/setup_dsl_tests.rb +7 -7
  52. data/test/unit/context/subject_dsl_tests.rb +3 -3
  53. data/test/unit/context/suite_dsl_tests.rb +3 -3
  54. data/test/unit/context/test_dsl_tests.rb +8 -8
  55. data/test/unit/context_info_tests.rb +6 -6
  56. data/test/unit/context_tests.rb +16 -16
  57. data/test/unit/default_runner_tests.rb +3 -3
  58. data/test/unit/default_suite_tests.rb +3 -3
  59. data/test/unit/factory_tests.rb +3 -3
  60. data/test/unit/file_line_tests.rb +12 -12
  61. data/test/unit/macro_tests.rb +2 -2
  62. data/test/unit/result_tests.rb +18 -18
  63. data/test/unit/runner_tests.rb +9 -9
  64. data/test/unit/suite_tests.rb +5 -5
  65. data/test/unit/test_tests.rb +19 -19
  66. data/test/unit/utils_tests.rb +18 -18
  67. data/test/unit/view_helpers_tests.rb +15 -15
  68. data/test/unit/view_tests.rb +11 -11
  69. data/tmp/.gitkeep +0 -0
  70. metadata +46 -44
  71. data/.assert.rb +0 -3
  72. data/.gitignore +0 -19
@@ -1,4 +1,4 @@
1
- require 'assert'
1
+ require "assert"
2
2
 
3
3
  class Assert::Test
4
4
 
@@ -273,18 +273,18 @@ class Assert::Test
273
273
  setup do
274
274
  @context_class = Factory.context_class do
275
275
  # assert style
276
- setup{ pass 'assert style setup' }
276
+ setup{ pass "assert style setup" }
277
277
  # test/unit style
278
- def setup; pass 'test/unit style setup'; end
278
+ def setup; pass "test/unit style setup"; end
279
279
  end
280
- @test = Factory.test("t", Factory.context_info(@context_class)){ pass 'TEST' }
280
+ @test = Factory.test("t", Factory.context_info(@context_class)){ pass "TEST" }
281
281
  @test.run(&test_run_callback)
282
282
  end
283
283
 
284
284
  should "execute all setup logic when run" do
285
285
  assert_equal 3, test_run_result_count(:pass)
286
286
 
287
- exp = ['assert style setup', 'test/unit style setup', 'TEST']
287
+ exp = ["assert style setup", "test/unit style setup", "TEST"]
288
288
  assert_equal exp, test_run_result_messages
289
289
  end
290
290
 
@@ -295,18 +295,18 @@ class Assert::Test
295
295
  setup do
296
296
  @context_class = Factory.context_class do
297
297
  # assert style
298
- teardown{ pass 'assert style teardown' }
298
+ teardown{ pass "assert style teardown" }
299
299
  # test/unit style
300
- def teardown; pass 'test/unit style teardown'; end
300
+ def teardown; pass "test/unit style teardown"; end
301
301
  end
302
- @test = Factory.test("t", Factory.context_info(@context_class)){ pass 'TEST' }
302
+ @test = Factory.test("t", Factory.context_info(@context_class)){ pass "TEST" }
303
303
  @test.run(&test_run_callback)
304
304
  end
305
305
 
306
306
  should "execute all teardown logic when run" do
307
307
  assert_equal 3, test_run_result_count(:pass)
308
308
 
309
- exp = ['TEST', 'assert style teardown', 'test/unit style teardown']
309
+ exp = ["TEST", "assert style teardown", "test/unit style teardown"]
310
310
  assert_equal exp, test_run_result_messages
311
311
  end
312
312
 
@@ -348,10 +348,10 @@ class Assert::Test
348
348
  assert_equal 13, test_run_result_count(:pass)
349
349
 
350
350
  exp = [
351
- 'parent around start', 'child around1 start', 'child around2 start',
352
- 'parent setup', 'child setup1', 'child setup2', 'TEST',
353
- 'child teardown1', 'child teardown2', 'parent teardown',
354
- 'child around2 end', 'child around1 end', 'parent around end'
351
+ "parent around start", "child around1 start", "child around2 start",
352
+ "parent setup", "child setup1", "child setup2", "TEST",
353
+ "child teardown1", "child teardown2", "parent teardown",
354
+ "child around2 end", "child around1 end", "parent around end"
355
355
  ]
356
356
  assert_equal exp, test_run_result_messages
357
357
  end
@@ -1,8 +1,8 @@
1
- require 'assert'
1
+ require "assert"
2
2
 
3
- require 'assert/config'
4
- require 'assert/stub'
5
- require 'much-stub'
3
+ require "assert/config"
4
+ require "assert/stub"
5
+ require "much-stub"
6
6
 
7
7
  module Assert
8
8
 
@@ -85,21 +85,21 @@ module Assert
85
85
  should "auto-unstub any stubs on teardown" do
86
86
  context_class = ::Factory.modes_off_context_class do
87
87
  setup do
88
- Assert.stub('1', :to_s){ 'one' }
88
+ Assert.stub("1", :to_s){ "one" }
89
89
  end
90
90
  end
91
91
 
92
- context_class.run_setups('scope')
92
+ context_class.run_setups("scope")
93
93
  assert_equal 1, Assert.stubs.size
94
94
 
95
- context_class.run_teardowns('scope')
95
+ context_class.run_teardowns("scope")
96
96
  assert_empty Assert.stubs
97
97
  end
98
98
 
99
99
  should "be able to call a stub's original method" do
100
100
  err = assert_raises(MuchStub::NotStubbedError){ Assert.stub_send(@myobj, :mymeth) }
101
- assert_includes 'not stubbed.', err.message
102
- assert_includes 'test/unit/assert_tests.rb', err.backtrace.first
101
+ assert_includes "not stubbed.", err.message
102
+ assert_includes "test/unit/assert_tests.rb", err.backtrace.first
103
103
 
104
104
  Assert.stub(@myobj, :mymeth){ @stub_value }
105
105
 
@@ -1,5 +1,5 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
4
  module Assert::Assertions
5
5
 
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_empty`"
12
12
  setup do
13
13
  desc = @desc = "assert empty fail desc"
14
- args = @args = [ [ 1 ], desc ]
14
+ args = @args = [[1], desc]
15
15
  @test = Factory.test do
16
16
  assert_empty([]) # pass
17
17
  assert_empty(*args) # fail
@@ -40,9 +40,9 @@ module Assert::Assertions
40
40
  desc "`assert_not_empty`"
41
41
  setup do
42
42
  desc = @desc = "assert not empty fail desc"
43
- args = @args = [ [], desc ]
43
+ args = @args = [[], desc]
44
44
  @test = Factory.test do
45
- assert_not_empty([ 1 ]) # pass
45
+ assert_not_empty([1]) # pass
46
46
  assert_not_empty(*args) # fail
47
47
  end
48
48
  @c = @test.config
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_equal`"
12
12
  setup do
13
13
  desc = @desc = "assert equal fail desc"
14
- a = @a = [ '1', '2', desc ]
14
+ a = @a = ["1", "2", desc]
15
15
  @test = Factory.test do
16
16
  assert_equal(1, 1) # pass
17
17
  assert_equal(*a) # fail
@@ -41,7 +41,7 @@ module Assert::Assertions
41
41
  desc "`assert_not_equal`"
42
42
  setup do
43
43
  desc = @desc = "assert not equal fail desc"
44
- a = @a = [ '1', '1', desc ]
44
+ a = @a = ["1", "1", desc]
45
45
  @test = Factory.test do
46
46
  assert_not_equal(*a) # fail
47
47
  assert_not_equal(1, 2) # pass
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_file_exists`"
12
12
  setup do
13
13
  desc = @desc = "assert file exists empty fail desc"
14
- args = @args = [ '/a/path/to/some/file/that/no/exists', desc ]
14
+ args = @args = ["/a/path/to/some/file/that/no/exists", desc]
15
15
  @test = Factory.test do
16
16
  assert_file_exists(__FILE__) # pass
17
17
  assert_file_exists(*args) # fail
@@ -40,9 +40,9 @@ module Assert::Assertions
40
40
  desc "`assert_not_file_exists`"
41
41
  setup do
42
42
  desc = @desc = "assert not file exists empty fail desc"
43
- args = @args = [ __FILE__, desc ]
43
+ args = @args = [__FILE__, desc]
44
44
  @test = Factory.test do
45
- assert_not_file_exists('/a/path/to/some/file/that/no/exists') # pass
45
+ assert_not_file_exists("/a/path/to/some/file/that/no/exists") # pass
46
46
  assert_not_file_exists(*args) # fail
47
47
  end
48
48
  @c = @test.config
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,9 +11,9 @@ module Assert::Assertions
11
11
  desc "`assert_includes`"
12
12
  setup do
13
13
  desc = @desc = "assert includes fail desc"
14
- args = @args = [ 2, [ 1 ], desc ]
14
+ args = @args = [2, [1], desc]
15
15
  @test = Factory.test do
16
- assert_includes(1, [ 1 ]) # pass
16
+ assert_includes(1, [1]) # pass
17
17
  assert_includes(*args) # fail
18
18
  end
19
19
  @c = @test.config
@@ -42,9 +42,9 @@ module Assert::Assertions
42
42
  desc "`assert_not_included`"
43
43
  setup do
44
44
  desc = @desc = "assert not included fail desc"
45
- args = @args = [ 1, [ 1 ], desc ]
45
+ args = @args = [1, [1], desc]
46
46
  @test = Factory.test do
47
- assert_not_included(2, [ 1 ]) # pass
47
+ assert_not_included(2, [1]) # pass
48
48
  assert_not_included(*args) # fail
49
49
  end
50
50
  @c = @test.config
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_instance_of`"
12
12
  setup do
13
13
  desc = @desc = "assert instance of fail desc"
14
- args = @args = [ Array, "object", desc ]
14
+ args = @args = [Array, "object", desc]
15
15
  @test = Factory.test do
16
16
  assert_instance_of(String, "object") # pass
17
17
  assert_instance_of(*args) # fail
@@ -41,7 +41,7 @@ module Assert::Assertions
41
41
  desc "`assert_not_instance_of`"
42
42
  setup do
43
43
  desc = @desc = "assert not instance of fail desc"
44
- args = @args = [ String, "object", desc ]
44
+ args = @args = [String, "object", desc]
45
45
  @test = Factory.test do
46
46
  assert_not_instance_of(*args) # fail
47
47
  assert_not_instance_of(Array, "object") # pass
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_kind_of`"
12
12
  setup do
13
13
  desc = @desc = "assert kind of fail desc"
14
- args = @args = [ Array, "object", desc ]
14
+ args = @args = [Array, "object", desc]
15
15
  @test = Factory.test do
16
16
  assert_kind_of(String, "object") # pass
17
17
  assert_kind_of(*args) # fail
@@ -41,7 +41,7 @@ module Assert::Assertions
41
41
  desc "`assert_not_kind_of`"
42
42
  setup do
43
43
  desc = @desc = "assert not kind of fail desc"
44
- args = @args = [ String, "object", desc ]
44
+ args = @args = [String, "object", desc]
45
45
  @test = Factory.test do
46
46
  assert_not_kind_of(*args) # fail
47
47
  assert_not_kind_of(Array, "object") # pass
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_match`"
12
12
  setup do
13
13
  desc = @desc = "assert match fail desc"
14
- args = @args = [ "not", "a string", desc ]
14
+ args = @args = ["not", "a string", desc]
15
15
  @test = Factory.test do
16
16
  assert_match(/a/, "a string") # pass
17
17
  assert_match(*args) # fail
@@ -41,7 +41,7 @@ module Assert::Assertions
41
41
  desc "`assert_not_match`"
42
42
  setup do
43
43
  desc = @desc = "assert not match fail desc"
44
- args = @args = [ /a/, "a string", desc ]
44
+ args = @args = [/a/, "a string", desc]
45
45
  @test = Factory.test do
46
46
  assert_not_match(*args) # fail
47
47
  assert_not_match("not", "a string") # pass
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_nil`"
12
12
  setup do
13
13
  desc = @desc = "assert nil empty fail desc"
14
- args = @args = [ 1, desc ]
14
+ args = @args = [1, desc]
15
15
  @test = Factory.test do
16
16
  assert_nil(nil) # pass
17
17
  assert_nil(*args) # fail
@@ -40,7 +40,7 @@ module Assert::Assertions
40
40
  desc "`assert_not_nil`"
41
41
  setup do
42
42
  desc = @desc = "assert not nil empty fail desc"
43
- args = @args = [ nil, desc ]
43
+ args = @args = [nil, desc]
44
44
  @test = Factory.test do
45
45
  assert_not_nil(1) # pass
46
46
  assert_not_nil(*args) # fail
@@ -1,5 +1,5 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
4
  module Assert::Assertions
5
5
 
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -11,7 +11,7 @@ module Assert::Assertions
11
11
  desc "`assert_respond_to`"
12
12
  setup do
13
13
  desc = @desc = "assert respond to fail desc"
14
- args = @args = [ :abs, "1", desc ]
14
+ args = @args = [:abs, "1", desc]
15
15
  @test = Factory.test do
16
16
  assert_respond_to(:abs, 1) # pass
17
17
  assert_respond_to(*args) # fail
@@ -42,7 +42,7 @@ module Assert::Assertions
42
42
  desc "`assert_not_respond_to`"
43
43
  setup do
44
44
  desc = @desc = "assert not respond to fail desc"
45
- args = @args = [ :abs, 1, desc ]
45
+ args = @args = [:abs, 1, desc]
46
46
  @test = Factory.test do
47
47
  assert_not_respond_to(*args) # fail
48
48
  assert_not_respond_to(:abs, "1") # pass
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -12,7 +12,7 @@ module Assert::Assertions
12
12
  setup do
13
13
  klass = Class.new; object = klass.new
14
14
  desc = @desc = "assert same fail desc"
15
- args = @args = [ object, klass.new, desc ]
15
+ args = @args = [object, klass.new, desc]
16
16
  @test = Factory.test do
17
17
  assert_same(object, object) # pass
18
18
  assert_same(*args) # fail
@@ -31,9 +31,9 @@ module Assert::Assertions
31
31
  should "have a fail message with custom and generic explanations" do
32
32
  exp = "#{@args[2]}\n"\
33
33
  "Expected #{Assert::U.show(@args[1], @c)}"\
34
- " (#<#{@args[1].class}:#{'0x0%x' % (@args[1].object_id << 1)}>)"\
34
+ " (#<#{@args[1].class}:#{"0x0%x" % (@args[1].object_id << 1)}>)"\
35
35
  " to be the same as #{Assert::U.show(@args[0], @c)}"\
36
- " (#<#{@args[0].class}:#{'0x0%x' % (@args[0].object_id << 1)}>)."
36
+ " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
37
37
  assert_equal exp, test_run_results(:fail).first.message
38
38
  end
39
39
 
@@ -46,7 +46,7 @@ module Assert::Assertions
46
46
  setup do
47
47
  klass = Class.new; object = klass.new
48
48
  desc = @desc = "assert not same fail desc"
49
- args = @args = [ object, object, desc ]
49
+ args = @args = [object, object, desc]
50
50
  @test = Factory.test do
51
51
  assert_not_same(*args) # fail
52
52
  assert_not_same(object, klass.new) # pass
@@ -65,9 +65,9 @@ module Assert::Assertions
65
65
  should "have a fail message with custom and generic explanations" do
66
66
  exp = "#{@args[2]}\n"\
67
67
  "Expected #{Assert::U.show(@args[1], @c)}"\
68
- " (#<#{@args[1].class}:#{'0x0%x' % (@args[1].object_id << 1)}>)"\
68
+ " (#<#{@args[1].class}:#{"0x0%x" % (@args[1].object_id << 1)}>)"\
69
69
  " to not be the same as #{Assert::U.show(@args[0], @c)}"\
70
- " (#<#{@args[0].class}:#{'0x0%x' % (@args[0].object_id << 1)}>)."
70
+ " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
71
71
  assert_equal exp, test_run_results(:fail).first.message
72
72
  end
73
73
 
@@ -103,9 +103,9 @@ module Assert::Assertions
103
103
  subject{ @test }
104
104
 
105
105
  should "include diff output in the fail messages" do
106
- exp = "Expected #<#{@act_obj.class}:#{'0x0%x' % (@act_obj.object_id << 1)}>"\
106
+ exp = "Expected #<#{@act_obj.class}:#{"0x0%x" % (@act_obj.object_id << 1)}>"\
107
107
  " to be the same as"\
108
- " #<#{@exp_obj.class}:#{'0x0%x' % (@exp_obj.object_id << 1)}>"\
108
+ " #<#{@exp_obj.class}:#{"0x0%x" % (@exp_obj.object_id << 1)}>"\
109
109
  ", diff:\n"\
110
110
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
111
111
  assert_equal exp, test_run_results(:fail).first.message
@@ -128,9 +128,9 @@ module Assert::Assertions
128
128
  subject{ @test }
129
129
 
130
130
  should "include diff output in the fail messages" do
131
- exp = "Expected #<#{@act_obj.class}:#{'0x0%x' % (@act_obj.object_id << 1)}>"\
131
+ exp = "Expected #<#{@act_obj.class}:#{"0x0%x" % (@act_obj.object_id << 1)}>"\
132
132
  " to not be the same as"\
133
- " #<#{@exp_obj.class}:#{'0x0%x' % (@exp_obj.object_id << 1)}>"\
133
+ " #<#{@exp_obj.class}:#{"0x0%x" % (@exp_obj.object_id << 1)}>"\
134
134
  ", diff:\n"\
135
135
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
136
136
  assert_equal exp, test_run_results(:fail).first.message