Commit cf1d9c59 authored by Hideki Yamane's avatar Hideki Yamane 🐈

Merge tag 'v0.4.0' into debian/sid

Version 0.4.0
parents 3e0ab843 b29cc0d0
source "https://rubygems.org"
gemspec
gem "bump"
gem "rake"
PATH
remote: .
specs:
rspec-instafail (0.4.0)
rspec
GEM
remote: https://rubygems.org/
specs:
bump (0.5.1)
diff-lcs (1.2.5)
rake (10.4.2)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
PLATFORMS
ruby
DEPENDENCIES
bump
rake
rspec-instafail!
BUNDLED WITH
1.10.6
require "bundler/setup"
require "bundler/gem_tasks"
require "bump/tasks"
task :default do
Bundler.with_clean_env do
sh "cd spec/rspec_1 && (bundle check || bundle) > /dev/null"
sh "cd spec/rspec_2 && (bundle check || bundle) > /dev/null"
sh "cd spec/rspec_3 && (bundle check || bundle) > /dev/null"
end
sh "rspec spec/instafail_spec.rb"
end
--- !ruby/object:Gem::Specification
name: rspec-instafail
version: !ruby/object:Gem::Version
version: 0.4.0
platform: ruby
authors:
- Michael Grosser
autorequire:
bindir: bin
cert_chain: []
date: 2015-09-03 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rspec
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
description:
email: michael@grosser.it
executables: []
extensions: []
extra_rdoc_files: []
files:
- Readme.md
- lib/rspec/instafail.rb
- lib/rspec/instafail/rspec_1.rb
- lib/rspec/instafail/rspec_2.rb
- lib/rspec/instafail/rspec_3.rb
- lib/rspec/instafail/version.rb
homepage: https://github.com/grosser/rspec-instafail
licenses:
- MIT
metadata: {}
post_install_message:
rdoc_options: []
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
rubyforge_project:
rubygems_version: 2.2.2
signing_key:
specification_version: 4
summary: Show failing specs instantly
test_files: []
name = 'rspec-instafail'
require './lib/rspec/instafail/version'
Gem::Specification.new name, RSpec::Instafail::VERSION do |s|
s.summary = "Show failing specs instantly"
s.authors = ["Michael Grosser"]
s.email = "michael@grosser.it"
s.homepage = "https://github.com/grosser/#{name}"
s.files = `git ls-files lib Readme.md`.split("\n")
s.license = "MIT"
s.add_runtime_dependency "rspec"
end
RSpec.configure do |config|
config.expect_with(:rspec) { |c| c.syntax = :should }
config.mock_with(:rspec) { |c| c.syntax = :should }
end
describe 'RSpec::Instafail' do
context "RSpec 1.x" do
before :all do
Bundler.with_clean_env do
@rspec_result = `cd spec/rspec_1 && bundle exec spec a_test.rb --format RSpec::Instafail`
end
end
before do
@output = @rspec_result.dup
end
it "outputs failures at start of output" do
@output.should =~ /^\s*1\)\s*'x fails logically'/m
end
it 'outputs errors in middle of output' do
@output.should =~ /\.\.\*\s*2\)\s*RuntimeError in 'x raises a simple error'/m
end
it 'outputs the the ending block' do
@output.should =~ /Finished in \d\.\d+ seconds\s*7 examples, 3 failures, 1 pending/
end
end
context 'Rspec 2.x' do
before :all do
Bundler.with_clean_env do
@rspec_result = `cd spec/rspec_2 && bundle exec rspec a_test.rb -I ../../lib --require rspec/instafail --format RSpec::Instafail --no-color --order defined`
end
end
before do
@output = @rspec_result.dup
end
it "outputs failures at start of output" do
@output.should =~ /^\s+1\) x fails logically/m
end
it 'outputs errors in middle of output' do
@output.should =~ /\.\.\*\s*2\) x raises a simple error/m
end
it 'outputs the the ending block' do
@output.should =~ /Finished in \d\.\d+ seconds\s*9 examples, 4 failures, 1 pending/
end
it "does not add ancestors after failures" do
@output.should include('ANCESTORS:17')
@output.should_not include('ANCESTORS:18')
end
end
context 'Rspec 3.x' do
before :all do
Bundler.with_clean_env do
@rspec_result = `cd spec/rspec_3 && bundle exec rspec a_test.rb -I ../../lib --require rspec/instafail --format RSpec::Instafail --no-color --order defined`
end
end
before do
@output = @rspec_result.dup
end
it "outputs failures at start of output" do
@output.should =~ /^\s+1\) x fails logically/m
end
it 'outputs errors in middle of output' do
@output.should =~ /\.\.\*\s*2\) x raises a simple error/m
end
it 'outputs the the ending block' do
@output.should =~ /Finished in \d\.\d+ seconds.*\s*9 examples, 4 failures, 1 pending/
end
it "does not add ancestors after failures" do
@output.should include('ANCESTORS:18')
@output.should_not include('ANCESTORS:19')
end
end
end
source 'https://rubygems.org'
gem 'rspec', '~> 1.3'
GEM
remote: https://rubygems.org/
specs:
rspec (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
rspec (~> 1.3)
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
describe 'x' do
it 'fails logically' do
1.should == 2
end
it 'b' do
end
it 'c' do
end
it 'pends' do
pending
raise
end
it 'raises a simple error' do
raise 'shallow failure'
end
it 'raises a hidden error' do
error = ExceptionWrappingException.new('There is an error in this error.')
error.original_exception = RuntimeError.new('There is no error in this error.')
raise error
end
it 'e' do
end
end
class ExceptionWrappingException < RuntimeError
attr_accessor :original_exception
end
source 'https://rubygems.org'
gem 'rspec', '~> 2.2'
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
rspec (2.99.0)
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.2)
PLATFORMS
ruby
DEPENDENCIES
rspec (~> 2.2)
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
describe 'x' do
it 'fails logically' do
1.should == 2
end
it 'b' do
end
it 'c' do
end
it 'pends' do
skip
raise
end
it 'raises a simple error' do
raise 'shallow failure'
end
it 'raises a hidden error' do
error = ExceptionWrappingException.new('There is an error in this error.')
error.original_exception = RuntimeError.new('There is no error in this error.')
raise error
end
it 'e' do
end
context "ancestors" do
after do |example|
puts "ANCESTORS:#{example.example_group.ancestors.size}"
end
it "does not add ancestors on failure" do
raise "BAM"
end
it "does not add ancestors on failure" do
end
end
end
class ExceptionWrappingException < RuntimeError
attr_accessor :original_exception
end
source 'https://rubygems.org'
gem 'rspec', '~> 3.0'
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
PLATFORMS
ruby
DEPENDENCIES
rspec (~> 3.0)
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
describe 'x' do
it 'fails logically' do
expect(1).to eq 2
end
it 'b' do
end
it 'c' do
end
it 'pends' do
pending
raise
end
it 'raises a simple error' do
raise 'shallow failure'
end
it 'raises a hidden error' do
error = ExceptionWrappingException.new('There is an error in this error.')
error.original_exception = RuntimeError.new('There is no error in this error.')
raise error
end
it 'e' do
end
context "ancestors" do
after do |example|
puts "ANCESTORS:#{example.example_group.ancestors.size}"
end
it "does not add ancestors on failure" do
raise "BAM"
end
it "does not add ancestors on failure" do
end
end
end
class ExceptionWrappingException < RuntimeError
attr_accessor :original_exception
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment