Skip to content

Commit

Permalink
Switch to rspec.
Browse files Browse the repository at this point in the history
  • Loading branch information
findchris committed Jul 13, 2011
1 parent b7fac31 commit 20f97ca
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -27,7 +27,7 @@ pkg
#
# For MacOS:
#
#.DS_Store
.DS_Store

# For TextMate
#*.tmproj
Expand Down
1 change: 1 addition & 0 deletions .rspec
@@ -0,0 +1 @@
--color
8 changes: 1 addition & 7 deletions Gemfile
@@ -1,13 +1,7 @@
source "http://rubygems.org"
# Add dependencies required to use your gem here.
# Example:
# gem "activesupport", ">= 2.3.5"

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem "shoulda", ">= 0"
gem "rspec"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.6.4"
gem "rcov", ">= 0"
end
26 changes: 26 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,26 @@
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.2)
git (1.2.5)
jeweler (1.6.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rake (0.9.2)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.0.0)
jeweler (~> 1.6.4)
rspec
24 changes: 10 additions & 14 deletions Rakefile
Expand Up @@ -17,30 +17,26 @@ Jeweler::Tasks.new do |gem|
gem.name = "representation"
gem.homepage = "http://github.com/findchris/representation"
gem.license = "MIT"
gem.summary = %Q{TODO: one-line summary of your gem}
gem.description = %Q{TODO: longer description of your gem}
gem.summary = %Q{Model logical groups of attributes as different object representations.}
gem.description = %Q{}
gem.email = "findchris@gmail.com"
gem.authors = ["Chris Johnson"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
test.rcov_opts << '--exclude "gems/*"'
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :default => :test
task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
Expand Down
7 changes: 7 additions & 0 deletions spec/representation_spec.rb
@@ -0,0 +1,7 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Representation" do
it "fails" do
fail "hey buddy, you should probably rename this file and start specing for real"
end
end
12 changes: 12 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,12 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'representation'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|

end
18 changes: 0 additions & 18 deletions test/helper.rb

This file was deleted.

7 changes: 0 additions & 7 deletions test/test_representation.rb

This file was deleted.

0 comments on commit 20f97ca

Please sign in to comment.