osdc 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ require 'stringio'
2
+ require 'test/unit'
3
+ require File.dirname(__FILE__) + '/../lib/osdc'
4
+
5
+ require "rubygems"
6
+ gem 'mocha'
7
+ require "mocha"
8
+ gem 'shoulda'
9
+ require "shoulda"
data/test/test_osdc.rb ADDED
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestOsdc < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def test_has_version
9
+ assert_not_nil(Osdc::VERSION)
10
+ end
11
+ end
@@ -0,0 +1,30 @@
1
+ require File.join(File.dirname(__FILE__), "test_helper.rb")
2
+ require 'osdc/cli'
3
+
4
+ class TestOsdcCli < Test::Unit::TestCase
5
+ context "for 2008 schedule" do
6
+ setup do
7
+ html = File.read(File.dirname(__FILE__) + "/fixtures/paper-2008.html")
8
+ Osdc::CLI.expects(:open).
9
+ with("http://osdc.com.au/2008/papers/index.html").
10
+ returns(html)
11
+ @stdout_io = StringIO.new
12
+ end
13
+
14
+ context "with request for list of authors" do
15
+ setup do
16
+ Date.expects(:today).returns(Date.new(2008, 12, 4)).at_least(1)
17
+ Osdc::CLI.execute(@stdout_io, %w[--authors])
18
+ @stdout_io.rewind
19
+ @stdout = @stdout_io.read
20
+ end
21
+
22
+ should "print out authors" do
23
+ assert_match(/Pfeiffer, Ferlito/, @stdout)
24
+ assert_match(/Williams/, @stdout)
25
+ assert_match(/Hudson/, @stdout)
26
+ end
27
+ end
28
+
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: osdc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dr Nic Williams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-12-04 00:00:00 +11:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: newgem
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.1.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.8.0
34
+ version:
35
+ description: FIX (describe your package)
36
+ email:
37
+ - drnicwilliams@gmail.com
38
+ executables:
39
+ - osdc
40
+ extensions: []
41
+
42
+ extra_rdoc_files:
43
+ - History.txt
44
+ - Manifest.txt
45
+ - PostInstall.txt
46
+ - README.rdoc
47
+ files:
48
+ - History.txt
49
+ - Manifest.txt
50
+ - PostInstall.txt
51
+ - README.rdoc
52
+ - Rakefile
53
+ - bin/osdc
54
+ - lib/osdc.rb
55
+ - lib/osdc/cli.rb
56
+ - script/console
57
+ - script/destroy
58
+ - script/generate
59
+ - test/fixtures/paper-2008.html
60
+ - test/test_helper.rb
61
+ - test/test_osdc.rb
62
+ - test/test_osdc_cli.rb
63
+ has_rdoc: true
64
+ homepage: FIX (url)
65
+ post_install_message:
66
+ rdoc_options:
67
+ - --main
68
+ - README.rdoc
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: "0"
76
+ version:
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: "0"
82
+ version:
83
+ requirements: []
84
+
85
+ rubyforge_project: drnicutilities
86
+ rubygems_version: 1.3.1
87
+ signing_key:
88
+ specification_version: 2
89
+ summary: FIX (describe your package)
90
+ test_files:
91
+ - test/test_helper.rb
92
+ - test/test_osdc.rb
93
+ - test/test_osdc_cli.rb