rubyuw 0.99.3 → 0.99.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.99.3
1
+ 0.99.4
@@ -42,6 +42,10 @@ module RubyUW
42
42
  def find(curriculum, term)
43
43
  curriculum = curriculum.strip # So we don't modify the original variable
44
44
  type = !!(curriculum =~ /^(.+?)(\d+)$/) ? :course : :curriculum
45
+
46
+ # Strip '+' out of terms so that WIN+2010 works (which is expected for SLNs and such)
47
+ term = term.gsub('+', '')
48
+
45
49
  send("find_#{type}", curriculum, term)
46
50
  end
47
51
 
data/rubyuw.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rubyuw}
8
- s.version = "0.99.3"
8
+ s.version = "0.99.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mitchell Hashimoto"]
@@ -17,7 +17,7 @@ class CurriculumTest < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  should "recognize each of the curriculums" do
20
- RubyUW::Curriculum.expects(:find_curriculum).times(@curriculums.length)
20
+ RubyUW::Curriculum.expects(:find_curriculum).times(@curriculums.length).with(anything, @term)
21
21
  RubyUW::Curriculum.expects(:find_course).never
22
22
 
23
23
  @curriculums.each do |curriculum|
@@ -33,6 +33,14 @@ class CurriculumTest < Test::Unit::TestCase
33
33
  RubyUW::Curriculum.find(course, @term)
34
34
  end
35
35
  end
36
+
37
+ should "strip '+' out of the term" do
38
+ @term = "WIN+2010"
39
+ @fixed_term = "WIN2010"
40
+
41
+ RubyUW::Curriculum.expects(:find_curriculum).once.with(anything, @fixed_term)
42
+ RubyUW::Curriculum.find(@curriculums[0], @term)
43
+ end
36
44
  end
37
45
 
38
46
  context "finding course information" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyuw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.3
4
+ version: 0.99.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto