Skip to content

Commit cda60a4

Browse files
author
travis
committed
corrected tests
1 parent 5829682 commit cda60a4

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

test/unit/setup_issue_show_test.rb

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
require File.expand_path('../../test_helper', __FILE__)
22

3+
# Testing process matches and updates issues/show
34
class SetupIssueShowTest < ActiveSupport::TestCase
4-
55
def setup
6-
@SetupIssueShow = SetupIssueShow.new
6+
@setup_issue_show = SetupIssueShow.new
77
end
88

99
def test_start
1010
assert_equal 'test', 'test'
1111
end
1212

1313
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+/]
1616
end
1717

1818
def test_show_file
19-
assert_equal @SetupIssueShow.show_file.class, Pathname
19+
assert_equal @setup_issue_show.show_file.class, Pathname
2020
end
2121

2222
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.'
2325

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.'
3228

29+
@setup_issue_show.current_version = '0.0.0'
30+
assert_nil @setup_issue_show.show_file
3331
end
34-
3532
end

0 commit comments

Comments
 (0)