rspec-instafail 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6eb29bfc65fc9c1f90984aad635ff1336244302d
4
- data.tar.gz: d30d2017dadd2ce70327a241fd07398758c9ef0e
3
+ metadata.gz: 6c065795325591e349c5726873a0db4f51f1b661
4
+ data.tar.gz: 92ef2ca3b1aa599e9d4e548dd599bb383837501f
5
5
  SHA512:
6
- metadata.gz: 6a030d26ea854b703e8441b8ff0f4662b8d9a261e90608b24111f5e5f0d8c57534343b1f5303261e6a6af512177a75433a706fb951b3091b3f68c6b2e883a2f3
7
- data.tar.gz: 88f838d2387dd0448f78a23030ece2cb09d4bc5b3206aa6c766a72ce78c2a4021fe8e28dc42365f3621810da5141f9e4e4ecf6c668e739635cc5246ea9748243
6
+ metadata.gz: ff087a1e33fec4242792a99c983fbec91754dfea0edaef437454392ae431a449e0d24f702f2d5e05aa320335e739611a88167c431bc9a99af0d6323ba3965d15
7
+ data.tar.gz: caeb936725711d6488e2f4ebfcf4350e7b23992f409bfa94196b8d343cf7b5dfcce57c158692994f8ae56f0a29caa871192525749ed72617166f7c47d803a47f
data/Readme.md CHANGED
@@ -2,37 +2,35 @@ Show failing specs instantly. Show passing spec as green dots as usual.
2
2
 
3
3
  Output
4
4
  ======
5
- ....................................................*....
6
- 1) ApplicationController#sign_out_and_redirect with JSON should return JSON indicating success
7
- Failure/Error: json_response = JSON.parse response.body
8
- A JSON text must at least contain two octets!
9
- # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `initialize'
10
- # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `new'
11
- # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `parse'
12
- # ./spec/controllers/application_controller_spec.rb:17:in `block (4 levels) in <top (required)>'
13
- ..................................................................
14
5
 
15
- Finished in 650.095614 seconds
6
+ ```
7
+ ....................................................*....
8
+ 1) ApplicationController#sign_out_and_redirect with JSON should return JSON indicating success
9
+ Failure/Error: json_response = JSON.parse response.body
10
+ A JSON text must at least contain two octets!
11
+ # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `initialize'
12
+ # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `new'
13
+ # /Users/miwillhite/.rvm/gems/ruby-1.9.2-p0/gems/json_pure-1.4.6/lib/json/common.rb:146:in `parse'
14
+ # ./spec/controllers/application_controller_spec.rb:17:in `block (4 levels) in <top (required)>'
15
+ ..................................................................
16
16
 
17
- 1680 examples, 1 failure, 1 pending
17
+ Finished in 650.095614 seconds
18
+
19
+ 1680 examples, 1 failure, 1 pending
20
+ ```
18
21
 
19
22
 
20
23
 
21
24
  Install
22
25
  =======
23
- As Gem:
24
- gem install rspec-instafail
25
-
26
- # spec/spec.opts (.rspec for rspec 2)
27
- --require rspec/instafail
28
- --format RSpec::Instafail
29
26
 
30
- As plugin:
31
- rails plugin install git://github.com/grosser/rspec-instafail.git
27
+ ```Bash
28
+ gem install rspec-instafail
32
29
 
33
- # spec/spec.opts (.rspec for rspec 2)
34
- --require vendor/plugins/rspec-instafail/lib/rspec/instafail
35
- --format RSpec::Instafail
30
+ # .rspec
31
+ --require rspec/instafail
32
+ --format RSpec::Instafail
33
+ ```
36
34
 
37
35
  Authors
38
36
  =======
@@ -46,6 +44,7 @@ Authors
46
44
  - [Mike Mazur](https://github.com/mikem)
47
45
  - [vernonR2](https://github.com/vernonR2)
48
46
  - [Olek Janiszewski](https://github.com/exviva)
47
+ - [Kevin Carter](https://github.com/DexterTheDragon)
49
48
 
50
49
  [Michael Grosser](http://grosser.it)<br/>
51
50
  michael@grosser.it<br/>
@@ -1,2 +1,5 @@
1
- require 'rspec/instafail'
2
- RSpec::Instafail::VERSION = '0.2.5'
1
+ module RSpec
2
+ class Instafail
3
+ VERSION = '0.2.6'
4
+ end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-instafail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-07 00:00:00.000000000 Z
11
+ date: 2015-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -30,27 +30,13 @@ executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
- - Gemfile
34
- - Gemfile.lock
35
- - Rakefile
36
33
  - Readme.md
37
34
  - lib/rspec/instafail.rb
38
35
  - lib/rspec/instafail/rspec_1.rb
39
36
  - lib/rspec/instafail/rspec_2.rb
40
37
  - lib/rspec/instafail/rspec_3.rb
41
38
  - lib/rspec/instafail/version.rb
42
- - rspec-instafail.gemspec
43
- - spec/instafail_spec.rb
44
- - spec/rspec_1/Gemfile
45
- - spec/rspec_1/Gemfile.lock
46
- - spec/rspec_1/a_test.rb
47
- - spec/rspec_2/Gemfile
48
- - spec/rspec_2/Gemfile.lock
49
- - spec/rspec_2/a_test.rb
50
- - spec/rspec_3/Gemfile
51
- - spec/rspec_3/Gemfile.lock
52
- - spec/rspec_3/a_test.rb
53
- homepage: http://github.com/grosser/rspec-instafail
39
+ homepage: https://github.com/grosser/rspec-instafail
54
40
  licenses:
55
41
  - MIT
56
42
  metadata: {}
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "bump"
6
- gem "rake"
@@ -1,28 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rspec-instafail (0.2.5)
5
- rspec
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- bump (0.4.0)
11
- diff-lcs (1.2.5)
12
- rake (10.0.3)
13
- rspec (2.99.0)
14
- rspec-core (~> 2.99.0)
15
- rspec-expectations (~> 2.99.0)
16
- rspec-mocks (~> 2.99.0)
17
- rspec-core (2.99.0)
18
- rspec-expectations (2.99.0)
19
- diff-lcs (>= 1.1.3, < 2.0)
20
- rspec-mocks (2.99.0)
21
-
22
- PLATFORMS
23
- ruby
24
-
25
- DEPENDENCIES
26
- bump
27
- rake
28
- rspec-instafail!
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- require "bundler/setup"
2
- require "bundler/gem_tasks"
3
- require "bump/tasks"
4
-
5
- task :default do
6
- Bundler.with_clean_env do
7
- sh "cd spec/rspec_1 && (bundle check || bundle) > /dev/null"
8
- sh "cd spec/rspec_2 && (bundle check || bundle) > /dev/null"
9
- sh "cd spec/rspec_3 && (bundle check || bundle) > /dev/null"
10
- end
11
- sh "rspec spec/"
12
- end
@@ -1,15 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2
- name = 'rspec-instafail'
3
-
4
- # needs rspec installed to load the version, so let's avoid this mess
5
- version = File.read("lib/rspec/instafail/version.rb")[/\d+\.\d+\.\d+/]
6
-
7
- Gem::Specification.new name, version do |s|
8
- s.summary = "Show failing specs instantly"
9
- s.authors = ["Michael Grosser"]
10
- s.email = "michael@grosser.it"
11
- s.homepage = "http://github.com/grosser/#{name}"
12
- s.files = `git ls-files`.split("\n")
13
- s.license = "MIT"
14
- s.add_runtime_dependency "rspec"
15
- end
@@ -1,83 +0,0 @@
1
- describe 'RSpec::Instafail' do
2
- context "RSpec 1.x" do
3
- before :all do
4
- Bundler.with_clean_env do
5
- @rspec_result = `cd spec/rspec_1 && bundle exec spec a_test.rb --format RSpec::Instafail`
6
- end
7
- end
8
-
9
- before do
10
- @output = @rspec_result.dup
11
- end
12
-
13
- it "outputs failures at start of output" do
14
- @output.should =~ /^\s*1\)\s*'x fails logically'/m
15
- end
16
-
17
- it 'outputs errors in middle of output' do
18
- @output.should =~ /\.\.\*\s*2\)\s*RuntimeError in 'x raises a simple error'/m
19
- end
20
-
21
- it 'outputs the the ending block' do
22
- @output.should =~ /Finished in \d\.\d+ seconds\s*7 examples, 3 failures, 1 pending/
23
- end
24
- end
25
-
26
- context 'Rspec 2.x' do
27
- before :all do
28
- Bundler.with_clean_env do
29
- @rspec_result = `cd spec/rspec_2 && bundle exec rspec a_test.rb --require ../../lib/rspec/instafail --format RSpec::Instafail --no-color --order default`
30
- end
31
- end
32
-
33
- before do
34
- @output = @rspec_result.dup
35
- end
36
-
37
- it "outputs failures at start of output" do
38
- @output.should =~ /^\s+1\) x fails logically/m
39
- end
40
-
41
- it 'outputs errors in middle of output' do
42
- @output.should =~ /\.\.\*\s*2\) x raises a simple error/m
43
- end
44
-
45
- it 'outputs the the ending block' do
46
- @output.should =~ /Finished in \d\.\d+ seconds\s*9 examples, 4 failures, 1 pending/
47
- end
48
-
49
- it "does not add ancestors after failures" do
50
- @output.should include('ANCESTORS:2')
51
- @output.should_not include('ANCESTORS:3')
52
- end
53
- end
54
-
55
- context 'Rspec 3.x' do
56
- before :all do
57
- Bundler.with_clean_env do
58
- @rspec_result = `cd spec/rspec_3 && bundle exec rspec a_test.rb --require ../../lib/rspec/instafail --format RSpec::Instafail --no-color --order default`
59
- end
60
- end
61
-
62
- before do
63
- @output = @rspec_result.dup
64
- end
65
-
66
- it "outputs failures at start of output" do
67
- @output.should =~ /^\s+1\) x fails logically/m
68
- end
69
-
70
- it 'outputs errors in middle of output' do
71
- @output.should =~ /\.\.\*\s*2\) x raises a simple error/m
72
- end
73
-
74
- it 'outputs the the ending block' do
75
- @output.should =~ /Finished in \d\.\d+ seconds.*\s*9 examples, 4 failures, 1 pending/
76
- end
77
-
78
- it "does not add ancestors after failures" do
79
- @output.should include('ANCESTORS:18')
80
- @output.should_not include('ANCESTORS:19')
81
- end
82
- end
83
- end
@@ -1,2 +0,0 @@
1
- source 'http://rubygems.org'
2
- gem 'rspec', '1.3.0'
@@ -1,12 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- diff-lcs (1.1.3)
5
- rspec (1.3.0)
6
-
7
- PLATFORMS
8
- ruby
9
-
10
- DEPENDENCIES
11
- diff-lcs (= 1.1.3)
12
- rspec (= 1.3.0)
@@ -1,35 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
2
-
3
- describe 'x' do
4
- it 'fails logically' do
5
- 1.should == 2
6
- end
7
-
8
- it 'b' do
9
- end
10
-
11
- it 'c' do
12
- end
13
-
14
- it 'pends' do
15
- pending
16
- raise
17
- end
18
-
19
- it 'raises a simple error' do
20
- raise 'shallow failure'
21
- end
22
-
23
- it 'raises a hidden error' do
24
- error = ExceptionWrappingException.new('There is an error in this error.')
25
- error.original_exception = RuntimeError.new('There is no error in this error.')
26
- raise error
27
- end
28
-
29
- it 'e' do
30
- end
31
- end
32
-
33
- class ExceptionWrappingException < RuntimeError
34
- attr_accessor :original_exception
35
- end
@@ -1,3 +0,0 @@
1
- source 'http://rubygems.org'
2
- gem 'rspec', '>=2.2'
3
-
@@ -1,19 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- diff-lcs (1.1.3)
5
- rspec (2.8.0)
6
- rspec-core (~> 2.8.0)
7
- rspec-expectations (~> 2.8.0)
8
- rspec-mocks (~> 2.8.0)
9
- rspec-core (2.8.0)
10
- rspec-expectations (2.8.0)
11
- diff-lcs (~> 1.1.2)
12
- rspec-mocks (2.8.0)
13
-
14
- PLATFORMS
15
- ruby
16
-
17
- DEPENDENCIES
18
- diff-lcs (= 1.1.3)
19
- rspec (>= 2.2)
@@ -1,48 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
2
-
3
- describe 'x' do
4
- it 'fails logically' do
5
- 1.should == 2
6
- end
7
-
8
- it 'b' do
9
- end
10
-
11
- it 'c' do
12
- end
13
-
14
- it 'pends' do
15
- pending
16
- raise
17
- end
18
-
19
- it 'raises a simple error' do
20
- raise 'shallow failure'
21
- end
22
-
23
- it 'raises a hidden error' do
24
- error = ExceptionWrappingException.new('There is an error in this error.')
25
- error.original_exception = RuntimeError.new('There is no error in this error.')
26
- raise error
27
- end
28
-
29
- it 'e' do
30
- end
31
-
32
- context "ancestors" do
33
- after do
34
- puts "ANCESTORS:#{example.example_group.ancestors.size}"
35
- end
36
-
37
- it "does not add ancestors on failure" do
38
- raise "BAM"
39
- end
40
-
41
- it "does not add ancestors on failure" do
42
- end
43
- end
44
- end
45
-
46
- class ExceptionWrappingException < RuntimeError
47
- attr_accessor :original_exception
48
- end
@@ -1,2 +0,0 @@
1
- source 'http://rubygems.org'
2
- gem 'rspec', '>=3.0'
@@ -1,22 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- diff-lcs (1.2.5)
5
- rspec (3.0.0)
6
- rspec-core (~> 3.0.0)
7
- rspec-expectations (~> 3.0.0)
8
- rspec-mocks (~> 3.0.0)
9
- rspec-core (3.0.0)
10
- rspec-support (~> 3.0.0)
11
- rspec-expectations (3.0.0)
12
- diff-lcs (>= 1.2.0, < 2.0)
13
- rspec-support (~> 3.0.0)
14
- rspec-mocks (3.0.0)
15
- rspec-support (~> 3.0.0)
16
- rspec-support (3.0.0)
17
-
18
- PLATFORMS
19
- ruby
20
-
21
- DEPENDENCIES
22
- rspec (>= 3.0)
@@ -1,48 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))
2
-
3
- describe 'x' do
4
- it 'fails logically' do
5
- expect(1).to eq 2
6
- end
7
-
8
- it 'b' do
9
- end
10
-
11
- it 'c' do
12
- end
13
-
14
- it 'pends' do
15
- pending
16
- raise
17
- end
18
-
19
- it 'raises a simple error' do
20
- raise 'shallow failure'
21
- end
22
-
23
- it 'raises a hidden error' do
24
- error = ExceptionWrappingException.new('There is an error in this error.')
25
- error.original_exception = RuntimeError.new('There is no error in this error.')
26
- raise error
27
- end
28
-
29
- it 'e' do
30
- end
31
-
32
- context "ancestors" do
33
- after do |example|
34
- puts "ANCESTORS:#{example.example_group.ancestors.size}"
35
- end
36
-
37
- it "does not add ancestors on failure" do
38
- raise "BAM"
39
- end
40
-
41
- it "does not add ancestors on failure" do
42
- end
43
- end
44
- end
45
-
46
- class ExceptionWrappingException < RuntimeError
47
- attr_accessor :original_exception
48
- end