Skip to content

Commit

Permalink
update for rspec2 and ruby 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Brand authored and Thomas Brand committed Jun 25, 2011
1 parent c8d39a5 commit b8f6c52
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
1 change: 1 addition & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rvm use --create 1.9.2@practice_game_of_life
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source :rubygems

gem 'rspec'
gem 'cucumber'
30 changes: 30 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
GEM
remote: http://rubygems.org/
specs:
builder (3.0.0)
cucumber (1.0.0)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.4.1)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
diff-lcs (1.1.2)
gherkin (2.4.1)
json (>= 1.4.6)
json (1.5.3)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
term-ansicolor (1.0.5)

PLATFORMS
ruby

DEPENDENCIES
cucumber
rspec
59 changes: 7 additions & 52 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@
require 'rubygems'
require 'rake'
require 'rspec'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "practice_game_of_life"
gem.summary = %Q{Cucumber features for practicing building game of life simulations}
gem.description = %Q{In order to not know when you have a functioning game of life simulator, you can use these cucumber features to check the rules, as well as running a few common patterns.}
gem.email = "[email protected]"
gem.homepage = "http://github.com/coreyhaines/game_of_life"
gem.authors = ["Corey Haines"]
gem.add_development_dependency "rspec"
gem.add_development_dependency "cucumber"
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :spec => :check_dependencies
RSpec::Core::RakeTask.new(:spec)

begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)

task :features => :check_dependencies
rescue LoadError
task :features do
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
Cucumber::Rake::Task.new(:cucumber) do |t|
t.cucumber_opts = "features --format pretty"
end

task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION')
version = File.read('VERSION')
else
version = ""
end
task :default => [:spec, :cucumber]

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "game_of_life #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'game_of_life'

require 'spec/expectations'
require 'rspec'
5 changes: 2 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'game_of_life'
require 'spec'
require 'spec/autorun'
require 'rspec'

Spec::Runner.configure do |config|
RSpec.configure do |config|

end

0 comments on commit b8f6c52

Please sign in to comment.