Skip to content

Commit

Permalink
Start writing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfajardo committed Sep 4, 2011
1 parent f95eda0 commit 4c36e35
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.rdoc
Expand Up @@ -60,3 +60,6 @@ You can also retrieve a book's full metadata details.
# or an array of authors
book_view.authors

== TO DO

Write Tests
3 changes: 3 additions & 0 deletions Rakefile
@@ -1 +1,4 @@
require "bundler/gem_tasks"
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new('spec')

5 changes: 5 additions & 0 deletions lib/openlibrary.rb
Expand Up @@ -7,4 +7,9 @@ module Openlibrary
autoload :Data, 'openlibrary/data'
autoload :View, 'openlibrary/view'

def self.version_string
"Openlibrary version #{Openlibrary::VERSION}"
end


end
8 changes: 8 additions & 0 deletions spec/openlibrary_spec.rb
@@ -0,0 +1,8 @@
require 'spec_helper'

describe Openlibrary do
it 'should return correct version string' do
Openlibrary.version_string.should == "Openlibrary version #{Openlibrary::VERSION}"
end
end

8 changes: 8 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,8 @@
require 'rspec'
require 'openlibrary'

RSpec.configure do |config|
config.color_enabled = true
config.formatter = 'documentation'
end

0 comments on commit 4c36e35

Please sign in to comment.