fuubar 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format Fuubar
data/Gemfile.lock CHANGED
@@ -1,16 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuubar (0.0.1)
5
- progressbar (~> 0.9)
4
+ fuubar (0.0.2)
6
5
  rspec (~> 2.0)
7
- rspec-instafail (~> 0.1)
6
+ rspec-instafail (~> 0.1.4)
7
+ ruby-progressbar (~> 0.0.9)
8
8
 
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
12
  diff-lcs (1.1.2)
13
- progressbar (0.9.0)
14
13
  rspec (2.1.0)
15
14
  rspec-core (~> 2.1.0)
16
15
  rspec-expectations (~> 2.1.0)
@@ -18,14 +17,15 @@ GEM
18
17
  rspec-core (2.1.0)
19
18
  rspec-expectations (2.1.0)
20
19
  diff-lcs (~> 1.1.2)
21
- rspec-instafail (0.1.2)
20
+ rspec-instafail (0.1.4)
22
21
  rspec-mocks (2.1.0)
22
+ ruby-progressbar (0.0.9)
23
23
 
24
24
  PLATFORMS
25
25
  ruby
26
26
 
27
27
  DEPENDENCIES
28
28
  fuubar!
29
- progressbar (~> 0.9)
30
29
  rspec (~> 2.0)
31
- rspec-instafail (~> 0.1)
30
+ rspec-instafail (~> 0.1.4)
31
+ ruby-progressbar (~> 0.0.9)
data/README.textile CHANGED
@@ -6,12 +6,11 @@ h2. Installation
6
6
 
7
7
  Installing Fuubar is easy. Just put it in your @Gemfile@ and run your specs like this from now on:
8
8
 
9
- bc. $ rspec --require fuubar --format Fuubar --color spec
9
+ bc. $ rspec --format Fuubar --color spec
10
10
 
11
11
  If you want to use Fuubar as your default formatter, simply put the options in your @.rspec@ file:
12
12
 
13
- bc. --require fuubar
14
- --format Fuubar
13
+ bc. --format Fuubar
15
14
  --color
16
15
 
17
16
  h2. Contributing
data/fuubar.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "fuubar"
5
- s.version = '0.0.1'
5
+ s.version = '0.0.2'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Nicholas Evans", "Jeff Kreeftmeijer"]
8
8
  s.email = ["jeff@kreeftmeijer.nl"]
9
- s.homepage = "http://rubygems.org/gems/fuubar"
9
+ s.homepage = "https://github.com/jeffkreeftmeijer/fuubar"
10
10
  s.summary = %q{the instafailing RSpec progress bar formatter}
11
11
  s.description = %q{the instafailing RSpec progress bar formatter}
12
12
 
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_dependency('rspec', ["~> 2.0"])
21
- s.add_dependency('progressbar', ["~> 0.9"])
22
- s.add_dependency('rspec-instafail', ["~> 0.1"])
21
+ s.add_dependency('ruby-progressbar', ["~> 0.0.9"])
22
+ s.add_dependency('rspec-instafail', ["~> 0.1.4"])
23
23
  end
data/lib/fuubar.rb CHANGED
@@ -10,14 +10,15 @@ class Fuubar < RSpec::Core::Formatters::BaseTextFormatter
10
10
  def start(example_count)
11
11
  @example_count = example_count
12
12
  @finished_count = 0
13
- @progress_bar = ProgressBar.new("#{example_count} examples", example_count, output)
13
+ @progress_bar = ProgressBar.new(" #{example_count} examples", example_count, output)
14
+ @progress_bar.bar_mark = '='
14
15
  end
15
16
 
16
17
  def increment
17
18
  with_color do
18
19
  @finished_count += 1
19
20
  @progress_bar.inc
20
- @progress_bar.instance_variable_set("@title", "#{finished_count}/#{example_count}")
21
+ @progress_bar.instance_variable_set("@title", " #{finished_count}/#{example_count}")
21
22
  end
22
23
  end
23
24
 
data/spec/fuubar_spec.rb CHANGED
@@ -17,7 +17,7 @@ describe Fuubar do
17
17
  end
18
18
 
19
19
  it 'should set the title' do
20
- @progress_bar.instance_variable_get(:@title).should == '2 examples'
20
+ @progress_bar.instance_variable_get(:@title).should == ' 2 examples'
21
21
  end
22
22
 
23
23
  it 'should set the total amount of specs' do
@@ -35,8 +35,15 @@ describe Fuubar do
35
35
  it 'should set the finished_count to 0' do
36
36
  @formatter.instance_variable_get(:@finished_count).should == 0
37
37
  end
38
+
39
+ it 'should set the bar mark to =' do
40
+ @progress_bar.instance_variable_get(:@bar_mark).should == '='
41
+ end
42
+
38
43
  end
44
+
39
45
  describe 'passed, pending and failed' do
46
+
40
47
  before do
41
48
  @formatter.stub!(:increment)
42
49
  end
@@ -106,7 +113,7 @@ describe Fuubar do
106
113
  @formatter.stub!(:finished_count).and_return(1)
107
114
  @formatter.stub!(:example_count).and_return(2)
108
115
  @formatter.increment
109
- @progress_bar.instance_variable_get(:@title).should == '1/2'
116
+ @progress_bar.instance_variable_get(:@title).should == ' 1/2'
110
117
  end
111
118
 
112
119
  it 'should increment the finished_count' do
@@ -124,13 +131,16 @@ describe Fuubar do
124
131
  end
125
132
 
126
133
  describe 'start_dump' do
134
+
127
135
  it 'should finish the progress bar' do
128
136
  @progress_bar.should_receive(:finish)
129
137
  @formatter.start_dump
130
138
  end
139
+
131
140
  end
132
141
 
133
142
  describe 'state' do
143
+
134
144
  it 'should be :green by default' do
135
145
  @formatter.state.should == :green
136
146
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuubar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 1
10
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Nicholas Evans
@@ -16,18 +15,16 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-11-15 00:00:00 +01:00
18
+ date: 2010-11-18 00:00:00 +01:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
23
22
  name: rspec
24
23
  prerelease: false
25
24
  requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
25
  requirements:
28
26
  - - ~>
29
27
  - !ruby/object:Gem::Version
30
- hash: 3
31
28
  segments:
32
29
  - 2
33
30
  - 0
@@ -35,33 +32,31 @@ dependencies:
35
32
  type: :runtime
36
33
  version_requirements: *id001
37
34
  - !ruby/object:Gem::Dependency
38
- name: progressbar
35
+ name: ruby-progressbar
39
36
  prerelease: false
40
37
  requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
38
  requirements:
43
39
  - - ~>
44
40
  - !ruby/object:Gem::Version
45
- hash: 25
46
41
  segments:
47
42
  - 0
43
+ - 0
48
44
  - 9
49
- version: "0.9"
45
+ version: 0.0.9
50
46
  type: :runtime
51
47
  version_requirements: *id002
52
48
  - !ruby/object:Gem::Dependency
53
49
  name: rspec-instafail
54
50
  prerelease: false
55
51
  requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
52
  requirements:
58
53
  - - ~>
59
54
  - !ruby/object:Gem::Version
60
- hash: 9
61
55
  segments:
62
56
  - 0
63
57
  - 1
64
- version: "0.1"
58
+ - 4
59
+ version: 0.1.4
65
60
  type: :runtime
66
61
  version_requirements: *id003
67
62
  description: the instafailing RSpec progress bar formatter
@@ -75,6 +70,7 @@ extra_rdoc_files: []
75
70
 
76
71
  files:
77
72
  - .gitignore
73
+ - .rspec
78
74
  - Gemfile
79
75
  - Gemfile.lock
80
76
  - LICENSE
@@ -84,7 +80,7 @@ files:
84
80
  - spec/fuubar_spec.rb
85
81
  - spec/spec_helper.rb
86
82
  has_rdoc: true
87
- homepage: http://rubygems.org/gems/fuubar
83
+ homepage: https://github.com/jeffkreeftmeijer/fuubar
88
84
  licenses: []
89
85
 
90
86
  post_install_message:
@@ -93,27 +89,23 @@ rdoc_options: []
93
89
  require_paths:
94
90
  - lib
95
91
  required_ruby_version: !ruby/object:Gem::Requirement
96
- none: false
97
92
  requirements:
98
93
  - - ">="
99
94
  - !ruby/object:Gem::Version
100
- hash: 3
101
95
  segments:
102
96
  - 0
103
97
  version: "0"
104
98
  required_rubygems_version: !ruby/object:Gem::Requirement
105
- none: false
106
99
  requirements:
107
100
  - - ">="
108
101
  - !ruby/object:Gem::Version
109
- hash: 3
110
102
  segments:
111
103
  - 0
112
104
  version: "0"
113
105
  requirements: []
114
106
 
115
107
  rubyforge_project: fuubar
116
- rubygems_version: 1.3.7
108
+ rubygems_version: 1.3.6
117
109
  signing_key:
118
110
  specification_version: 3
119
111
  summary: the instafailing RSpec progress bar formatter