Permalink
Browse files

Upgrade RSpec, Cucumber, Spinach versions

  • Loading branch information...
1 parent 4ea9226 commit 62a1306601be2ed68510b8fe6412c3ca67802bf5 @nicksieger nicksieger committed Dec 26, 2013
View
2 .hoerc
@@ -0,0 +1,2 @@
+---
+exclude: !ruby/regexp /tmp$|CVS|TAGS|\.(svn|git|DS_Store)|Gemfile.lock/
View
12 Gemfile
@@ -6,17 +6,7 @@
source 'https://rubygems.org'
-gem 'builder'
+gemspec
group :development do
- gem 'hoe'
- gem 'hoe-git', '~> 1.5.0'
- gem 'rubyforge'
- gem 'cucumber'
- gem 'spinach', '< 0.2'
- gem 'rspec', '> 2.0.0'
- gem 'test-unit', '> 2.0.0'
- gem 'minitest'
- gem 'rcov', :platform => :ruby_18
- gem 'rdoc'
gem 'jruby-openssl', :platform => :jruby
end
View
@@ -1,6 +1,8 @@
+.gemtest
+.hoerc
+.rspec
.travis.yml
Gemfile
-Gemfile.lock
History.txt
LICENSE.txt
Manifest.txt
@@ -10,10 +12,8 @@ acceptance/cucumber/cucumber_example.feature
acceptance/cucumber/step_definitions/development_steps.rb
acceptance/minitest_example_test.rb
acceptance/rspec_example_spec.rb
-acceptance/spinach/Gemfile
-acceptance/spinach/Gemfile.lock
acceptance/spinach/features/spinach_example.feature
-acceptance/spinach/features/steps/example_steps.rb
+acceptance/spinach/features/steps/example_spinach_feature.rb
acceptance/test_unit_example_test.rb
acceptance/verification_spec.rb
ci_reporter.gemspec
View
@@ -25,13 +25,13 @@ begin
p.test_globs = ["spec/**/*_spec.rb"]
p.extra_deps << [ 'builder', '>= 2.1.2' ]
p.extra_dev_deps << [ 'hoe-git', '~> 1.5.0' ]
- p.extra_dev_deps << [ 'cucumber', '~> 0.10.0' ]
+ p.extra_dev_deps << [ 'cucumber', '>= 1.3.3' ]
p.extra_dev_deps << [ 'rspec', '> 2.0.0' ]
p.extra_dev_deps << [ 'test-unit', '> 2.4.9' ]
p.extra_dev_deps << [ 'minitest', '~> 2.2.0' ]
- p.extra_dev_deps << [ 'spinach', '< 0.2' ]
-
+ p.extra_dev_deps << [ 'spinach', '>= 0.8.7' ]
p.clean_globs += ["spec/reports", "acceptance/reports"]
+ p.license 'MIT'
end
hoe.spec.rdoc_options += ["-SHN", "-f", "darkfish"]
@@ -43,37 +43,56 @@ rescue LoadError
puts "You really need Hoe installed to be able to package this gem"
end
-task :generate_output do
- rm_rf "acceptance/reports"
- ENV['CI_REPORTS'] = "acceptance/reports"
+def run_ruby_acceptance(cmd)
+ ENV['CI_REPORTS'] ||= "acceptance/reports"
if ENV['RUBYOPT']
opts = ENV['RUBYOPT']
ENV['RUBYOPT'] = nil
else
opts = "-rubygems"
end
- rspec = "#{Gem.loaded_specs['rspec-core'].gem_dir}/exe/rspec"
- cucumber = "#{Gem.loaded_specs['cucumber'].gem_dir}/bin/cucumber"
begin
result_proc = proc {|ok,*| puts "Failures above are expected." unless ok }
- ruby "-Ilib #{opts} -rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb", &result_proc
- ruby "-Ilib #{opts} -rci/reporter/rake/minitest_loader acceptance/minitest_example_test.rb", &result_proc
- ruby "-Ilib #{opts} -S #{rspec} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb", &result_proc
- ruby "-Ilib #{opts} -rci/reporter/rake/cucumber_loader -S #{cucumber} --format CI::Reporter::Cucumber acceptance/cucumber", &result_proc
- Dir.chdir 'acceptance/spinach' do
- Bundler.with_clean_env do
- ENV['CI_REPORTS'] = "../reports/spinach"
- sh "bundle"
- spinach = "#{Gem.loaded_specs['spinach'].gem_dir}/bin/spinach"
- ruby "-I../../lib #{opts} -rci/reporter/rake/spinach_loader -S #{spinach}", &result_proc
- end
- end
+ ruby "-Ilib #{opts} #{cmd}", &result_proc
ensure
ENV['RUBYOPT'] = opts if opts != "-rubygems"
ENV.delete 'CI_REPORTS'
end
end
-task :acceptance => :generate_output
+
+
+namespace :generate do
+ task :test_unit do
+ run_ruby_acceptance "-rci/reporter/rake/test_unit_loader acceptance/test_unit_example_test.rb"
+ end
+
+ task :minitest do
+ run_ruby_acceptance "-rci/reporter/rake/minitest_loader acceptance/minitest_example_test.rb"
+ end
+
+ task :rspec do
+ rspec = "#{Gem.loaded_specs['rspec-core'].gem_dir}/exe/rspec"
+ run_ruby_acceptance "-S #{rspec} --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb"
+ end
+
+ task :cucumber do
+ cucumber = "#{Gem.loaded_specs['cucumber'].gem_dir}/bin/cucumber"
+ run_ruby_acceptance "-rci/reporter/rake/cucumber_loader -S #{cucumber} --format CI::Reporter::Cucumber acceptance/cucumber"
+ end
+
+ task :spinach do
+ spinach = "#{Gem.loaded_specs['spinach'].gem_dir}/bin/spinach"
+ run_ruby_acceptance "-I../../lib -rci/reporter/rake/spinach_loader -S #{spinach} -r ci_reporter -f acceptance/spinach/features"
+ end
+
+ task :clean do
+ rm_rf "acceptance/reports"
+ end
+
+ task :all => [:clean, :test_unit, :minitest, :rspec, :cucumber, :spinach]
+end
+
+task :acceptance => "generate:all"
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:acceptance_spec) do |t|
@@ -1,4 +1,4 @@
-Feature: Example feature
+Feature: Example Cucumber feature
As a conscientious developer who writes features
I want to be able to see my features passing on the CI Server
So that I can bask in the glow of a green bar
@@ -16,4 +16,4 @@ Feature: Example feature
Scenario: Bad coder
Given that I can't code for peanuts
And I write step definitions that throw exceptions
- Then I shouldn't be allowed out in public
+ Then I shouldn't be allowed out in public
@@ -1,4 +0,0 @@
-source 'https://rubygems.org'
-gem 'ci_reporter', :path => '../..'
-gem 'spinach', '< 0.2'
-gem 'rspec'
@@ -1,35 +0,0 @@
-PATH
- remote: ../..
- specs:
- ci_reporter (1.8.4)
- builder (>= 2.1.2)
-
-GEM
- remote: https://rubygems.org/
- specs:
- builder (3.2.2)
- colorize (0.5.8)
- diff-lcs (1.1.3)
- gherkin (2.5.4)
- json (>= 1.4.6)
- json (1.8.0)
- rspec (2.8.0)
- rspec-core (~> 2.8.0)
- rspec-expectations (~> 2.8.0)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
- spinach (0.1.5.4)
- colorize
- gherkin (= 2.5.4)
-
-PLATFORMS
- java
- ruby
-
-DEPENDENCIES
- ci_reporter!
- rspec
- spinach (< 0.2)
@@ -1,4 +1,4 @@
-Feature: Example feature
+Feature: Example Spinach feature
As a conscientious developer who writes features
I want to be able to see my features passing on the CI Server
So that I can bask in the glow of a green bar
@@ -0,0 +1,34 @@
+require 'rspec'
+
+class Spinach::Features::ExampleSpinachFeature < Spinach::FeatureSteps
+ include RSpec::Matchers
+
+ step 'that I am a conscientious developer' do
+ end
+
+ step 'I write cucumber features' do
+ end
+
+ step 'I should see a green bar' do
+ end
+
+ step 'that I am a lazy hacker' do
+ end
+
+ step 'I don\'t bother writing cucumber features' do
+ false.should be_true
+ end
+
+ step 'I should be fired' do
+ end
+
+ step 'that I can\'t code for peanuts' do
+ end
+
+ step 'I write step definitions that throw exceptions' do
+ raise RuntimeError, "User error!"
+ end
+
+ step 'I shouldn\'t be allowed out in public' do
+ end
+end
@@ -1,36 +0,0 @@
-require 'rspec'
-
-class ExampleFeature < Spinach::FeatureSteps
- include RSpec::Matchers
-
- feature 'Example feature'
-
- Given 'that I am a conscientious developer' do
- end
-
- And 'I write cucumber features' do
- end
-
- Then 'I should see a green bar' do
- end
-
- Given 'that I am a lazy hacker' do
- end
-
- And 'I don\'t bother writing cucumber features' do
- false.should be_true
- end
-
- Then 'I should be fired' do
- end
-
- Given 'that I can\'t code for peanuts' do
- end
-
- And 'I write step definitions that throw exceptions' do
- raise RuntimeError, "User error!"
- end
-
- Then 'I shouldn\'t be allowed out in public' do
- end
-end
@@ -1,5 +1,5 @@
#--
-# Copyright (c) 2006-2012 Nick Sieger <nicksieger@gmail.com>
+# Copyright (c) 2006-2013 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
#++
@@ -109,15 +109,15 @@
end
describe "Cucumber acceptance" do
- it "should generate three XML files" do
- File.exist?(File.join(REPORTS_DIR, 'FEATURES-Example-feature.xml')).should == true
+ it "should generate one XML file" do
+ File.exist?(File.join(REPORTS_DIR, 'FEATURES-Example-Cucumber-feature.xml')).should == true
- Dir["#{REPORTS_DIR}/FEATURES-*.xml"].length.should == 1
+ Dir["#{REPORTS_DIR}/FEATURES-*Cucumber*.xml"].length.should == 1
end
context "FEATURES report file" do
before :each do
- @doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Example-feature.xml')) do |f|
+ @doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Example-Cucumber-feature.xml')) do |f|
REXML::Document.new(f)
end
end
@@ -143,18 +143,16 @@
end
end
-SPINACH_REPORTS_DIR = File.expand_path('spinach', REPORTS_DIR)
-
describe "Spinach acceptance" do
- it "should generate three XML files" do
- File.exist?(File.join(SPINACH_REPORTS_DIR, 'FEATURES-Example-feature.xml')).should == true
+ it "should generate one XML file" do
+ File.exist?(File.join(REPORTS_DIR, 'FEATURES-Example-Spinach-feature.xml')).should == true
- Dir["#{SPINACH_REPORTS_DIR}/FEATURES-*.xml"].length.should == 1
+ Dir["#{REPORTS_DIR}/FEATURES-*Spinach*.xml"].length.should == 1
end
context "SPINACH report file" do
before :each do
- @doc = File.open(File.join(SPINACH_REPORTS_DIR, 'FEATURES-Example-feature.xml')) do |f|
+ @doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Example-Spinach-feature.xml')) do |f|
REXML::Document.new(f)
end
end
View
@@ -6,13 +6,13 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Sieger"]
- s.date = "2013-07-02"
+ s.date = "2013-12-26"
s.description = "CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows you to generate XML reports of your test, spec and/or feature runs. The resulting files can be read by a continuous integration system that understands Ant's JUnit report XML format, thus allowing your CI system to track test/spec successes and failures."
s.email = "nick@nicksieger.com"
- s.license = 'MIT'
- s.extra_rdoc_files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc"]
- s.files = [".travis.yml", "Gemfile", "Gemfile.lock", "History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "acceptance/cucumber/cucumber_example.feature", "acceptance/cucumber/step_definitions/development_steps.rb", "acceptance/minitest_example_test.rb", "acceptance/rspec_example_spec.rb", "acceptance/spinach/Gemfile", "acceptance/spinach/Gemfile.lock", "acceptance/spinach/features/spinach_example.feature", "acceptance/spinach/features/steps/example_steps.rb", "acceptance/test_unit_example_test.rb", "acceptance/verification_spec.rb", "ci_reporter.gemspec", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/minitest.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/minitest.rb", "lib/ci/reporter/rake/minitest_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/spinach.rb", "lib/ci/reporter/rake/spinach_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "lib/ci/reporter/rake/utils.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/spinach.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb", "spec/spec_helper.rb", "stub.rake", "tasks/ci_reporter.rake", ".gemtest"]
+ s.extra_rdoc_files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "README.rdoc"]
+ s.files = [".gemtest", ".hoerc", ".rspec", ".travis.yml", "Gemfile", "History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "acceptance/cucumber/cucumber_example.feature", "acceptance/cucumber/step_definitions/development_steps.rb", "acceptance/minitest_example_test.rb", "acceptance/rspec_example_spec.rb", "acceptance/spinach/Gemfile", "acceptance/spinach/features/spinach_example.feature", "acceptance/spinach/features/steps/example_steps.rb", "acceptance/test_unit_example_test.rb", "acceptance/verification_spec.rb", "ci_reporter.gemspec", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/minitest.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/minitest.rb", "lib/ci/reporter/rake/minitest_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/spinach.rb", "lib/ci/reporter/rake/spinach_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "lib/ci/reporter/rake/utils.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/spinach.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb", "spec/spec_helper.rb", "stub.rake", "tasks/ci_reporter.rake"]
s.homepage = "http://caldersphere.rubyforge.org/ci_reporter"
+ s.licenses = ["MIT"]
s.rdoc_options = ["--main", "README.rdoc", "-SHN", "-f", "darkfish"]
s.require_paths = ["lib"]
s.rubyforge_project = "caldersphere"
@@ -28,34 +28,34 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
s.add_development_dependency(%q<hoe-git>, ["~> 1.5.0"])
- s.add_development_dependency(%q<cucumber>, ["~> 0.10.0"])
+ s.add_development_dependency(%q<cucumber>, [">= 1.3.3"])
s.add_development_dependency(%q<rspec>, ["> 2.0.0"])
s.add_development_dependency(%q<test-unit>, ["> 2.4.9"])
s.add_development_dependency(%q<minitest>, ["~> 2.2.0"])
- s.add_development_dependency(%q<spinach>, ["< 0.2"])
- s.add_development_dependency(%q<hoe>, ["~> 3.6"])
+ s.add_development_dependency(%q<spinach>, [">= 0.8.7"])
+ s.add_development_dependency(%q<hoe>, ["~> 3.7"])
else
s.add_dependency(%q<builder>, [">= 2.1.2"])
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
s.add_dependency(%q<rdoc>, ["~> 4.0"])
s.add_dependency(%q<hoe-git>, ["~> 1.5.0"])
- s.add_dependency(%q<cucumber>, ["~> 0.10.0"])
+ s.add_dependency(%q<cucumber>, [">= 1.3.3"])
s.add_dependency(%q<rspec>, ["> 2.0.0"])
s.add_dependency(%q<test-unit>, ["> 2.4.9"])
s.add_dependency(%q<minitest>, ["~> 2.2.0"])
- s.add_dependency(%q<spinach>, ["< 0.2"])
- s.add_dependency(%q<hoe>, ["~> 3.6"])
+ s.add_dependency(%q<spinach>, [">= 0.8.7"])
+ s.add_dependency(%q<hoe>, ["~> 3.7"])
end
else
s.add_dependency(%q<builder>, [">= 2.1.2"])
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
s.add_dependency(%q<rdoc>, ["~> 4.0"])
s.add_dependency(%q<hoe-git>, ["~> 1.5.0"])
- s.add_dependency(%q<cucumber>, ["~> 0.10.0"])
+ s.add_dependency(%q<cucumber>, [">= 1.3.3"])
s.add_dependency(%q<rspec>, ["> 2.0.0"])
s.add_dependency(%q<test-unit>, ["> 2.4.9"])
s.add_dependency(%q<minitest>, ["~> 2.2.0"])
- s.add_dependency(%q<spinach>, ["< 0.2"])
- s.add_dependency(%q<hoe>, ["~> 3.6"])
+ s.add_dependency(%q<spinach>, [">= 0.8.7"])
+ s.add_dependency(%q<hoe>, ["~> 3.7"])
end
end
@@ -2,4 +2,4 @@
require 'ci/reporter/spinach'
ENV['CI_CAPTURE'] = 'off'
-CI::Reporter::Spinach.new.bind
+
Oops, something went wrong.

0 comments on commit 62a1306

Please sign in to comment.