|
14 | 14 | assert_equal File.expand_path("/another/dir"), second_strategy.base_report_dir
|
15 | 15 | end
|
16 | 16 |
|
17 |
| - test "example_hash is distinct when examples first backtrace entry is different" do |
| 17 | + test "example_hash is distinct when examples implementation is different" do |
18 | 18 | strategy = Selenium::RSpec::Reporting::FilePathStrategy.new "report.html"
|
19 | 19 |
|
20 |
| - first_example = stub('example',:backtrace => [ "a", "c" ]) |
21 |
| - second_example = stub('example',:backtrace => [ "b", "c" ]) |
| 20 | + first_example = Object.new |
| 21 | + first_example.instance_variable_set :'@_implementation', Proc.new {} |
| 22 | + second_example = Object.new |
| 23 | + second_example.instance_variable_set :'@_implementation', Proc.new {} |
| 24 | + |
22 | 25 | assert strategy.example_hash(first_example) != strategy.example_hash(second_example)
|
23 | 26 | end
|
24 | 27 |
|
25 |
| - test "example_hash is the same when examples first backtrace entry is identical" do |
| 28 | + test "example_hash is the same when examples implementation is identical" do |
26 | 29 | strategy = Selenium::RSpec::Reporting::FilePathStrategy.new "report.html"
|
27 |
| - |
28 |
| - first_example = stub('example',:backtrace => [ "a", "b" ]) |
29 |
| - second_example = stub('example',:backtrace => [ "a", "c" ]) |
| 30 | + |
| 31 | + same_implementation = Proc.new {} |
| 32 | + first_example = Object.new |
| 33 | + first_example.instance_variable_set :'@_implementation', same_implementation |
| 34 | + second_example = Object.new |
| 35 | + second_example.instance_variable_set :'@_implementation', same_implementation |
30 | 36 | assert_equal strategy.example_hash(first_example),
|
31 | 37 | strategy.example_hash(second_example)
|
32 | 38 | end
|
|
0 commit comments