|
1 | 1 | require File.expand_path('../../test_helper', __FILE__)
|
2 | 2 |
|
| 3 | +# Testing process matches and updates issues/show |
3 | 4 | class SetupIssueShowTest < ActiveSupport::TestCase
|
4 |
| - |
5 | 5 | def setup
|
6 |
| - @SetupIssueShow = SetupIssueShow.new |
| 6 | + @setup_issue_show = SetupIssueShow.new |
7 | 7 | end
|
8 | 8 |
|
9 | 9 | def test_start
|
10 | 10 | assert_equal 'test', 'test'
|
11 | 11 | end
|
12 | 12 |
|
13 | 13 | def test_version_detection
|
14 |
| - assert_equal @SetupIssueShow.current_version.class, String |
15 |
| - assert_not_nil @SetupIssueShow.current_version[/\d+\.\d+\.\d+/] |
| 14 | + assert_equal @setup_issue_show.current_version.class, String |
| 15 | + assert_not_nil @setup_issue_show.current_version[/\d+\.\d+\.\d+/] |
16 | 16 | end
|
17 | 17 |
|
18 | 18 | def test_show_file
|
19 |
| - assert_equal @SetupIssueShow.show_file.class, Pathname |
| 19 | + assert_equal @setup_issue_show.show_file.class, Pathname |
20 | 20 | end
|
21 | 21 |
|
22 | 22 | def test_correct_file_found
|
| 23 | + @setup_issue_show.current_version = '2.3.1' |
| 24 | + assert_equal '2.3.1', @setup_issue_show.show_file.redmine_version, 'Did not find the exact match.' |
23 | 25 |
|
24 |
| - @SetupIssueShow.current_version="2.3.1" |
25 |
| - assert_equal "2.3.1", @SetupIssueShow.show_file.redmine_version, "Did not find the exact match." |
26 |
| - |
27 |
| - @SetupIssueShow.current_version="2.3.2" |
28 |
| - assert_equal "2.3.1", @SetupIssueShow.show_file.redmine_version, "Did not find the most recent match." |
29 |
| - |
30 |
| - @SetupIssueShow.current_version="0.0.0" |
31 |
| - assert_nil @SetupIssueShow.show_file |
| 26 | + @setup_issue_show.current_version = '2.3.2' |
| 27 | + assert_equal '2.3.1', @setup_issue_show.show_file.redmine_version, 'Did not find the most recent match.' |
32 | 28 |
|
| 29 | + @setup_issue_show.current_version = '0.0.0' |
| 30 | + assert_nil @setup_issue_show.show_file |
33 | 31 | end
|
34 |
| - |
35 | 32 | end
|
0 commit comments