fuubar 0.0.6 → 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in fuubar.gemspec
4
4
  gemspec
5
+
6
+ gem 'rake'
data/fuubar.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "fuubar"
5
- s.version = '0.0.6'
5
+ s.version = '1.0.0.rc1'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Nicholas Evans", "Jeff Kreeftmeijer"]
8
8
  s.email = ["jeff@kreeftmeijer.nl"]
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.add_dependency('rspec', ["~> 2.0"])
21
21
  s.add_dependency('ruby-progressbar', ["~> 0.0.10"])
22
- s.add_dependency('rspec-instafail', ["~> 0.1.8"])
22
+ s.add_dependency('rspec-instafail', ["~> 0.2.0"])
23
23
  end
data/spec/fuubar_spec.rb CHANGED
@@ -2,43 +2,47 @@ require 'spec_helper'
2
2
  require 'stringio'
3
3
 
4
4
  describe Fuubar do
5
+ let(:output) { StringIO.new }
5
6
 
6
- before do
7
- @output = StringIO.new
8
- @formatter = Fuubar.new(@output)
9
- @formatter.start(2)
10
- @progress_bar = @formatter.instance_variable_get(:@progress_bar)
11
- @example = RSpec::Core::ExampleGroup.describe.example
7
+ let(:formatter) do
8
+ formatter = Fuubar.new(output)
9
+ formatter.start(2)
10
+
11
+ formatter
12
12
  end
13
13
 
14
+ let(:progress_bar) { formatter.instance_variable_get(:@progress_bar) }
15
+ let(:example) { RSpec::Core::ExampleGroup.describe.example }
16
+
17
+
14
18
  describe 'start' do
15
19
 
16
20
  it 'should create a new ProgressBar' do
17
- @progress_bar.should be_instance_of ProgressBar
21
+ progress_bar.should be_instance_of ProgressBar
18
22
  end
19
23
 
20
24
  it 'should set the title' do
21
- @progress_bar.instance_variable_get(:@title).should == ' 2 examples'
25
+ progress_bar.instance_variable_get(:@title).should == ' 2 examples'
22
26
  end
23
27
 
24
28
  it 'should set the total amount of specs' do
25
- @progress_bar.instance_variable_get(:@total).should == 2
29
+ progress_bar.instance_variable_get(:@total).should == 2
26
30
  end
27
31
 
28
32
  it 'should set the output' do
29
- @progress_bar.instance_variable_get(:@out).should == @formatter.output
33
+ progress_bar.instance_variable_get(:@out).should == formatter.output
30
34
  end
31
35
 
32
36
  it 'should set the example_count' do
33
- @formatter.instance_variable_get(:@example_count).should == 2
37
+ formatter.instance_variable_get(:@example_count).should == 2
34
38
  end
35
39
 
36
40
  it 'should set the finished_count to 0' do
37
- @formatter.instance_variable_get(:@finished_count).should == 0
41
+ formatter.instance_variable_get(:@finished_count).should == 0
38
42
  end
39
43
 
40
44
  it 'should set the bar mark to =' do
41
- @progress_bar.instance_variable_get(:@bar_mark).should == '='
45
+ progress_bar.instance_variable_get(:@bar_mark).should == '='
42
46
  end
43
47
 
44
48
  end
@@ -46,14 +50,14 @@ describe Fuubar do
46
50
  describe 'passed, pending and failed' do
47
51
 
48
52
  before do
49
- @formatter.stub!(:increment)
53
+ formatter.stub!(:increment)
50
54
  end
51
55
 
52
56
  describe 'example_passed' do
53
57
 
54
58
  it 'should call the increment method' do
55
- @formatter.should_receive :increment
56
- @formatter.example_passed(@example)
59
+ formatter.should_receive :increment
60
+ formatter.example_passed(example)
57
61
  end
58
62
 
59
63
  end
@@ -61,19 +65,19 @@ describe Fuubar do
61
65
  describe 'example_pending' do
62
66
 
63
67
  it 'should call the increment method' do
64
- @formatter.should_receive :increment
65
- @formatter.example_pending(@example)
68
+ formatter.should_receive :increment
69
+ formatter.example_pending(example)
66
70
  end
67
71
 
68
72
  it 'should set the state to :yellow' do
69
- @formatter.example_pending(@example)
70
- @formatter.state.should == :yellow
73
+ formatter.example_pending(example)
74
+ formatter.state.should == :yellow
71
75
  end
72
76
 
73
77
  it 'should not set the state to :yellow when it is :red already' do
74
- @formatter.instance_variable_set(:@state, :red)
75
- @formatter.example_pending(@example)
76
- @formatter.state.should == :red
78
+ formatter.instance_variable_set(:@state, :red)
79
+ formatter.example_pending(example)
80
+ formatter.state.should == :red
77
81
  end
78
82
 
79
83
  end
@@ -81,22 +85,22 @@ describe Fuubar do
81
85
  describe 'example_failed' do
82
86
 
83
87
  before do
84
- @formatter.instafail.stub!(:example_failed)
88
+ formatter.instafail.stub!(:example_failed)
85
89
  end
86
90
 
87
91
  it 'should call the increment method' do
88
- @formatter.should_receive :increment
89
- @formatter.example_failed(@example)
92
+ formatter.should_receive :increment
93
+ formatter.example_failed(example)
90
94
  end
91
95
 
92
96
  it 'should call instafail.example_failed' do
93
- @formatter.instafail.should_receive(:example_failed).with(@example)
94
- @formatter.example_failed(@example)
97
+ formatter.instafail.should_receive(:example_failed).with(example)
98
+ formatter.example_failed(example)
95
99
  end
96
100
 
97
101
  it 'should set the state to :red' do
98
- @formatter.example_failed(@example)
99
- @formatter.state.should == :red
102
+ formatter.example_failed(example)
103
+ formatter.state.should == :red
100
104
  end
101
105
 
102
106
  end
@@ -106,25 +110,25 @@ describe Fuubar do
106
110
  describe 'increment' do
107
111
 
108
112
  it 'should increment the progress bar' do
109
- @progress_bar.should_receive(:inc)
110
- @formatter.increment
113
+ progress_bar.should_receive(:inc)
114
+ formatter.increment
111
115
  end
112
116
 
113
117
  it 'should change the progress bar title' do
114
- @formatter.stub!(:finished_count).and_return(1)
115
- @formatter.stub!(:example_count).and_return(2)
116
- @formatter.increment
117
- @progress_bar.instance_variable_get(:@title).should == ' 1/2'
118
+ formatter.stub!(:finished_count).and_return(1)
119
+ formatter.stub!(:example_count).and_return(2)
120
+ formatter.increment
121
+ progress_bar.instance_variable_get(:@title).should == ' 1/2'
118
122
  end
119
123
 
120
124
  it 'should increment the finished_count' do
121
- lambda { @formatter.increment }.should change(@formatter, :finished_count).by(1)
125
+ lambda { formatter.increment }.should change(formatter, :finished_count).by(1)
122
126
  end
123
127
 
124
128
  it 'should increment the progress bar before updating the title' do
125
- @progress_bar.should_receive(:instance_variable_set).ordered
126
- @progress_bar.should_receive(:inc).ordered
127
- @formatter.increment
129
+ progress_bar.should_receive(:instance_variable_set).ordered
130
+ progress_bar.should_receive(:inc).ordered
131
+ formatter.increment
128
132
  end
129
133
 
130
134
  end
@@ -132,7 +136,7 @@ describe Fuubar do
132
136
  describe 'instafail' do
133
137
 
134
138
  it 'should be an instance of RSpec::Instafail' do
135
- @formatter.instafail.should be_instance_of(RSpec::Instafail)
139
+ formatter.instafail.should be_instance_of(RSpec::Instafail)
136
140
  end
137
141
 
138
142
  end
@@ -140,8 +144,8 @@ describe Fuubar do
140
144
  describe 'start_dump' do
141
145
 
142
146
  it 'should finish the progress bar' do
143
- @progress_bar.should_receive(:finish)
144
- @formatter.start_dump
147
+ progress_bar.should_receive(:finish)
148
+ formatter.start_dump
145
149
  end
146
150
 
147
151
  end
@@ -149,7 +153,7 @@ describe Fuubar do
149
153
  describe 'state' do
150
154
 
151
155
  it 'should be :green by default' do
152
- @formatter.state.should == :green
156
+ formatter.state.should == :green
153
157
  end
154
158
 
155
159
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
1
  require 'fuubar'
metadata CHANGED
@@ -1,81 +1,57 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fuubar
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 6
10
- version: 0.0.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc1
5
+ prerelease: 6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Nicholas Evans
14
9
  - Jeff Kreeftmeijer
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-08-08 00:00:00 +02:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
13
+ date: 2012-02-04 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
23
16
  name: rspec
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70285349505580 !ruby/object:Gem::Requirement
26
18
  none: false
27
- requirements:
19
+ requirements:
28
20
  - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 2
33
- - 0
34
- version: "2.0"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.0'
35
23
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: ruby-progressbar
39
24
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *70285349505580
26
+ - !ruby/object:Gem::Dependency
27
+ name: ruby-progressbar
28
+ requirement: &70285349500200 !ruby/object:Gem::Requirement
41
29
  none: false
42
- requirements:
30
+ requirements:
43
31
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 11
46
- segments:
47
- - 0
48
- - 0
49
- - 10
32
+ - !ruby/object:Gem::Version
50
33
  version: 0.0.10
51
34
  type: :runtime
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: rspec-instafail
55
35
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *70285349500200
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec-instafail
39
+ requirement: &70285349493160 !ruby/object:Gem::Requirement
57
40
  none: false
58
- requirements:
41
+ requirements:
59
42
  - - ~>
60
- - !ruby/object:Gem::Version
61
- hash: 11
62
- segments:
63
- - 0
64
- - 1
65
- - 8
66
- version: 0.1.8
43
+ - !ruby/object:Gem::Version
44
+ version: 0.2.0
67
45
  type: :runtime
68
- version_requirements: *id003
46
+ prerelease: false
47
+ version_requirements: *70285349493160
69
48
  description: the instafailing RSpec progress bar formatter
70
- email:
49
+ email:
71
50
  - jeff@kreeftmeijer.nl
72
51
  executables: []
73
-
74
52
  extensions: []
75
-
76
53
  extra_rdoc_files: []
77
-
78
- files:
54
+ files:
79
55
  - .gitignore
80
56
  - .rspec
81
57
  - Gemfile
@@ -86,40 +62,30 @@ files:
86
62
  - lib/fuubar.rb
87
63
  - spec/fuubar_spec.rb
88
64
  - spec/spec_helper.rb
89
- has_rdoc: true
90
65
  homepage: https://github.com/jeffkreeftmeijer/fuubar
91
66
  licenses: []
92
-
93
67
  post_install_message:
94
68
  rdoc_options: []
95
-
96
- require_paths:
69
+ require_paths:
97
70
  - lib
98
- required_ruby_version: !ruby/object:Gem::Requirement
71
+ required_ruby_version: !ruby/object:Gem::Requirement
99
72
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- hash: 3
104
- segments:
105
- - 0
106
- version: "0"
107
- required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
78
  none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 3
113
- segments:
114
- - 0
115
- version: "0"
79
+ requirements:
80
+ - - ! '>'
81
+ - !ruby/object:Gem::Version
82
+ version: 1.3.1
116
83
  requirements: []
117
-
118
84
  rubyforge_project: fuubar
119
- rubygems_version: 1.3.7
85
+ rubygems_version: 1.8.6
120
86
  signing_key:
121
87
  specification_version: 3
122
88
  summary: the instafailing RSpec progress bar formatter
123
- test_files:
89
+ test_files:
124
90
  - spec/fuubar_spec.rb
125
91
  - spec/spec_helper.rb